profectus-docs/api/modules/util/common.html

29 lines
No EOL
39 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Module: util/common | Profectus</title>
<meta name="description" content="A game engine that grows with you.">
<link rel="stylesheet" href="/assets/style.148fff69.css">
<link rel="modulepreload" href="/assets/app.7cfe4cf0.js">
<link rel="modulepreload" href="/assets/api_modules_util_common.md.7e23d796.lean.js">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,600;1,400">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<script defer="true" data-domain="moddingtree.com" src="https://plausible.io/js/plausible.js"></script>
<meta name="og:description" content="A game engine that grows with you">
<meta name="og:image" content="/Logo.png">
<meta name="twitter:title" content="Module: util/common | Profectus">
<meta property="og:title" content="Module: util/common | Profectus">
</head>
<body>
<div id="app"><!--[--><div class="theme"><header class="nav-bar" data-v-675d8756><div class="sidebar-button" data-v-675d8756><svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z" class></path></svg></div><a class="nav-bar-title" href="/" aria-label="Profectus, back to home" data-v-675d8756 data-v-cc01ef16><!----> Profectus</a><div class="flex-grow" data-v-675d8756></div><div class="nav" data-v-675d8756><nav class="nav-links" data-v-675d8756 data-v-eab3edfe><!--[--><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item" href="/guide/" data-v-b8818f8c>Guide <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item active" href="/api/" data-v-b8818f8c>API <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://forums.moddingtree.com" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>Forums <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://discord.gg/F3xveHV" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>Discord <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://github.com/profectus-engine/Profectus" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>Github <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><!--]--><!----><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://github.com/profectus-engine/profectus-docs" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav></div><!--[--><!--]--></header><aside class="sidebar" data-v-83e92a68><nav class="nav-links nav" data-v-83e92a68 data-v-eab3edfe><!--[--><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item" href="/guide/" data-v-b8818f8c>Guide <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item active" href="/api/" data-v-b8818f8c>API <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://forums.moddingtree.com" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>Forums <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://discord.gg/F3xveHV" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>Discord <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://github.com/profectus-engine/Profectus" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>Github <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><!--]--><!----><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://github.com/profectus-engine/profectus-docs" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav><!--[--><!--]--><ul class="sidebar-links" data-v-83e92a68><!--[--><li class="sidebar-link"><p class="sidebar-link-item">Components</p><ul class="sidebar-links"><li class="sidebar-link"><p class="sidebar-link-item">Fields</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/fields/DangerButtonComponent.html"> Danger Button Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/fields/FeedbackButtonComponent.html"> Feedback Button Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/fields/SelectComponent.html"> Select Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/fields/SliderComponent.html"> Slider Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/fields/TextComponent.html"> Text Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/fields/ToggleComponent.html"> Toggle Component</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Layout</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/layout/CollapsibleComponent.html"> Collapsible Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/layout/ColumnComponent.html"> Column Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/layout/RowComponent.html"> Row Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/layout/SpacerComponent.html"> Spacer Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/layout/StickyComponent.html"> Sticky Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/layout/VerticalRuleComponent.html"> Vertical Rule Component</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Math</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/math/FloorComponent.html"> Floor Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/math/SqrtComponent.html"> Sqrt Component</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/ContextComponent.html"> Context Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/InfoComponent.html"> Info Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/LayerComponent.html"> Layer Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/MarkNodeComponent.html"> Mark Node Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/ModalComponent.html"> Modal Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/NodeComponent.html"> Node Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/components/SaveComponent.html"> Save Component</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Data</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/data/common.html">Common</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/data/projEntry.html">Proj Entry</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/data/themes.html">Themes</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Features</p><ul class="sidebar-links"><li class="sidebar-link"><p class="sidebar-link-item">Achievements</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/achievements/AchievementComponent.html"> Achievement Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/achievements/achievement.html">Achievement</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Bars</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/bars/BarComponent.html"> Bar Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/bars/bar.html">Bar</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Boards</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/boards/BoardComponent.html"> Board Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/boards/BoardLinkComponent.html"> Board Link Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/boards/BoardNodeComponent.html"> Board Node Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/boards/board.html">Board</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Challenges</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/challenges/ChallengeComponent.html"> Challenge Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/challenges/challenge.html">Challenge</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Clickables</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/clickables/ClickableComponent.html"> Clickable Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/clickables/clickable.html">Clickable</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Grids</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/grids/GridCellComponent.html"> Grid Cell Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/grids/GridComponent.html"> Grid Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/grids/grid.html">Grid</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Infoboxes</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/infoboxes/InfoboxComponent.html"> Infobox Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/infoboxes/infobox.html">Infobox</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Links</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/links/LinkComponent.html"> Link Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/links/LinksComponent.html"> Links Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/links/links.html">Links</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Milestones</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/milestones/MilestoneComponent.html"> Milestone Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/milestones/milestone.html">Milestone</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Particles</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/particles/ParticlesComponent.html"> Particles Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/particles/particles.html">Particles</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Resources</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/resources/MainDisplayComponent.html"> Main Display Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/resources/ResourceComponent.html"> Resource Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/resources/resource.html">Resource</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Tabs</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/tabs/TabButtonComponent.html"> Tab Button Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/tabs/TabComponent.html"> Tab Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/tabs/TabFamilyComponent.html"> Tab Family Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/tabs/tab.html">Tab</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/tabs/tabFamily.html">Tab Family</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Tooltips</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/tooltips/TooltipComponent.html"> Tooltip Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/tooltips/tooltip.html">Tooltip</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Trees</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/trees/TreeComponent.html"> Tree Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/trees/TreeNodeComponent.html"> Tree Node Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/trees/tree.html">Tree</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Upgrades</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/features/upgrades/UpgradeComponent.html"> Upgrade Component</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/upgrades/upgrade.html">Upgrade</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/buyable.html">Buyable</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/conversion.html">Conversion</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/feature.html">Feature</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/hotkey.html">Hotkey</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/features/reset.html">Reset</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Game</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/events.html">Events</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/layers.html">Layers</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/modifiers.html">Modifiers</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/notifications.html">Notifications</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/persistence.html">Persistence</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/player.html">Player</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/settings.html">Settings</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/game/state.html">State</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Lib</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/lib/break_eternity.html">Break Eternity</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/lib/pwa-register.html">Pwa-register</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Util</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/util/bignum.html">Bignum</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/util/break_eternity.html">Break Eternity</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item active" href="/api/modules/util/common.html">Common</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#enumerations">Enumerations</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#type-aliases">Type aliases</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#withrequired">WithRequired</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="#functions">Functions</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#cameltotitle">camelToTitle</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#isfunction">isFunction</a><!----></li></ul></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/util/computed.html">Computed</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/util/proxies.html">Proxies</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/util/save.html">Save</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/api/modules/util/vue.html">Vue</a><!----></li></ul></li><!--]--></ul><!--[--><!--]--></aside><div class="sidebar-mask"></div><main class="page" data-v-7eddb2c4><div class="container" data-v-7eddb2c4><!--[--><!--]--><div style="position:relative;" class="content" data-v-7eddb2c4><div><h1 id="module-util-common" tabindex="-1">Module: util/common <a class="header-anchor" href="#module-util-common" aria-hidden="true">#</a></h1><h2 id="enumerations" tabindex="-1">Enumerations <a class="header-anchor" href="#enumerations" aria-hidden="true">#</a></h2><ul><li><a href="../../enums/util/common.Direction">Direction</a></li></ul><h2 id="type-aliases" tabindex="-1">Type aliases <a class="header-anchor" href="#type-aliases" aria-hidden="true">#</a></h2><h3 id="withrequired" tabindex="-1">WithRequired <a class="header-anchor" href="#withrequired" aria-hidden="true">#</a></h3><p>Ƭ <strong>WithRequired</strong>&lt;<code>T</code>, <code>K</code>&gt;: <code>T</code> &amp; { [<code>P</code> in <code>K</code>]-?: <code>T</code>[<code>P</code>] }</p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;"><code>T</code></td></tr><tr><td style="text-align:left;"><code>K</code></td><td style="text-align:left;">extends keyof <code>T</code></td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/804e596/src/util/common.ts#L1" target="_blank" rel="noopener noreferrer">profectus/src/util/common.ts:1</a></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-hidden="true">#</a></h2><h3 id="cameltotitle" tabindex="-1">camelToTitle <a class="header-anchor" href="#cameltotitle" aria-hidden="true">#</a></h3><p><strong>camelToTitle</strong>(<code>camel</code>): <code>string</code></p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>camel</code></td><td style="text-align:left;"><code>string</code></td></tr></tbody></table><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-hidden="true">#</a></h4><p><code>string</code></p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/804e596/src/util/common.ts#L5" target="_blank" rel="noopener noreferrer">profectus/src/util/common.ts:5</a></p><hr><h3 id="isfunction" tabindex="-1">isFunction <a class="header-anchor" href="#isfunction" aria-hidden="true">#</a></h3><p><strong>isFunction</strong>(<code>func</code>): <code>func</code> is <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" target="_blank" rel="noopener noreferrer"><code>Function</code></a></p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-hidden="true">#</a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>func</code></td><td style="text-align:left;"><code>unknown</code></td></tr></tbody></table><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-hidden="true">#</a></h4><p><code>func</code> is <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" target="_blank" rel="noopener noreferrer"><code>Function</code></a></p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/804e596/src/util/common.ts#L12" target="_blank" rel="noopener noreferrer">profectus/src/util/common.ts:12</a></p></div></div><footer class="page-footer" data-v-7eddb2c4 data-v-07c132fc><div class="edit" data-v-07c132fc><div class="edit-link" data-v-07c132fc data-v-1ed99556><a class="link" href="https://github.com/profectus-engine/profectus-docs/edit/main/docs/api/modules/util/common.md" target="_blank" rel="noopener noreferrer" data-v-1ed99556>Edit this page on GitHub <svg class="icon outbound icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-1ed99556><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="updated" data-v-07c132fc><!----></div></footer><div class="next-and-prev-link" data-v-7eddb2c4 data-v-38ede35f><div class="container" data-v-38ede35f><div class="prev" data-v-38ede35f><a class="link" href="/api/modules/util/break_eternity" data-v-38ede35f><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-prev" data-v-38ede35f><path d="M19,11H7.4l5.3-5.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-7,7c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.2-0.1,0.5,0,0.8c0.1,0.1,0.1,0.2,0.2,0.3l7,7c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4L7.4,13H19c0.6,0,1-0.4,1-1S19.6,11,19,11z"></path></svg><span class="text" data-v-38ede35f>Break Eternity</span></a></div><div class="next" data-v-38ede35f><a class="link" href="/api/modules/util/computed" data-v-38ede35f><span class="text" data-v-38ede35f>Computed</span><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-next" data-v-38ede35f><path d="M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"></path></svg></a></div></div></div><!--[--><!--]--></div></main></div><!----><!--]--></div>
<script>__VP_HASH_MAP__ = JSON.parse("{\"api_classes_lib_break_eternity.decimal.md\":\"cab51b1a\",\"api_components_contextcomponent.md\":\"3af2bb40\",\"api_components_infocomponent.md\":\"ab14abad\",\"api_components_layercomponent.md\":\"d6fbd2c4\",\"api_components_marknodecomponent.md\":\"6b2d67a5\",\"api_components_modalcomponent.md\":\"c17e2947\",\"api_components_nodecomponent.md\":\"4ec5c41c\",\"api_components_savecomponent.md\":\"a3af30c9\",\"api_components_fields_dangerbuttoncomponent.md\":\"4780bcb2\",\"api_components_fields_feedbackbuttoncomponent.md\":\"47481f00\",\"api_components_fields_selectcomponent.md\":\"9824cff7\",\"api_components_fields_slidercomponent.md\":\"8f5c7e06\",\"api_components_fields_textcomponent.md\":\"e237b50b\",\"api_components_fields_togglecomponent.md\":\"8b405ff6\",\"api_components_layout_collapsiblecomponent.md\":\"79cb9075\",\"api_components_layout_columncomponent.md\":\"28b8858d\",\"api_components_layout_rowcomponent.md\":\"9031f0d5\",\"api_components_layout_spacercomponent.md\":\"04995b6d\",\"api_components_layout_stickycomponent.md\":\"2719f539\",\"api_components_layout_verticalrulecomponent.md\":\"91d93531\",\"api_components_math_floorcomponent.md\":\"1066dfc4\",\"api_components_math_sqrtcomponent.md\":\"3e9a28b8\",\"api_enums_data_themes.themes.md\":\"89110eae\",\"api_enums_features_boards_board.progressdisplay.md\":\"395d6995\",\"api_enums_features_boards_board.shape.md\":\"b41cefb4\",\"api_enums_features_feature.visibility.md\":\"7ad930a6\",\"api_enums_features_milestones_milestone.milestonedisplay.md\":\"6c3a162f\",\"api_enums_util_common.direction.md\":\"e94c05f1\",\"api_features_achievements_achievementcomponent.md\":\"ea109115\",\"api_features_bars_barcomponent.md\":\"6a511759\",\"api_features_boards_boardcomponent.md\":\"c37decfd\",\"api_features_boards_boardlinkcomponent.md\":\"62983c9b\",\"api_features_boards_boardnodecomponent.md\":\"5fa653e2\",\"api_features_challenges_challengecomponent.md\":\"e8cf476c\",\"api_features_clickables_clickablecomponent.md\":\"034515d9\",\"api_features_grids_gridcellcomponent.md\":\"2d69dd20\",\"api_features_grids_gridcomponent.md\":\"479bd570\",\"api_features_infoboxes_infoboxcomponent.md\":\"71388720\",\"api_features_links_linkcomponent.md\":\"895fb86c\",\"api_features_links_linkscomponent.md\":\"95ce785b\",\"api_features_milestones_milestonecomponent.md\":\"057b078b\",\"api_features_particles_particlescomponent.md\":\"87906de5\",\"api_features_resources_maindisplaycomponent.md\":\"bbf5fd58\",\"api_features_resources_resourcecomponent.md\":\"9b918134\",\"api_features_tabs_tabbuttoncomponent.md\":\"75eeeea0\",\"api_features_tabs_tabcomponent.md\":\"ecc0bc8e\",\"api_features_tabs_tabfamilycomponent.md\":\"c6c0df96\",\"api_features_tooltips_tooltipcomponent.md\":\"4f8a1396\",\"api_features_trees_treecomponent.md\":\"ccc4b72e\",\"api_features_trees_treenodecomponent.md\":\"1e47f0f0\",\"api_features_upgrades_upgradecomponent.md\":\"c62d5b0c\",\"api_index.md\":\"58c99f1b\",\"api_interfaces_data_common.layertreenodeoptions.md\":\"0fd93004\",\"api_interfaces_data_common.resetbuttonoptions.md\":\"c63d64bb\",\"api_interfaces_data_themes.theme.md\":\"a1019f49\",\"api_interfaces_data_themes.themevars.md\":\"358478c4\",\"api_interfaces_features_achievements_achievement.achievementoptions.md\":\"c259d795\",\"api_interfaces_features_achievements_achievement.baseachievement.md\":\"a8d446d4\",\"api_interfaces_features_bars_bar.baroptions.md\":\"66b0a40b\",\"api_interfaces_features_bars_bar.basebar.md\":\"3e9c9ba1\",\"api_interfaces_features_boards_board.baseboard.md\":\"6122a40d\",\"api_interfaces_features_boards_board.baseboardnodeaction.md\":\"e27e7bd1\",\"api_interfaces_features_boards_board.basenodetype.md\":\"fa4968e6\",\"api_interfaces_features_boards_board.boardnode.md\":\"4550f48c\",\"api_interfaces_features_boards_board.boardnodeactionoptions.md\":\"d9ddb5b1\",\"api_interfaces_features_boards_board.boardnodelink.md\":\"d89fa000\",\"api_interfaces_features_boards_board.boardoptions.md\":\"c02da3c5\",\"api_interfaces_features_boards_board.nodelabel.md\":\"efb42c7b\",\"api_interfaces_features_boards_board.nodetypeoptions.md\":\"8ab82ca9\",\"api_interfaces_features_buyable.basebuyable.md\":\"ef156b38\",\"api_interfaces_features_buyable.buyableoptions.md\":\"7aaed9ba\",\"api_interfaces_features_challenges_challenge.basechallenge.md\":\"37163d9d\",\"api_interfaces_features_challenges_challenge.challengeoptions.md\":\"5365eab0\",\"api_interfaces_features_clickables_clickable.baseclickable.md\":\"14a559c3\",\"api_interfaces_features_clickables_clickable.clickableoptions.md\":\"b2751b6b\",\"api_interfaces_features_conversion.baseconversion.md\":\"8a81bd47\",\"api_interfaces_features_conversion.conversionoptions.md\":\"94899759\",\"api_interfaces_features_conversion.scalingfunction.md\":\"adc965fa\",\"api_interfaces_features_grids_grid.basegrid.md\":\"c7b4f6ef\",\"api_interfaces_features_grids_grid.gridcell.md\":\"696e9c83\",\"api_interfaces_features_grids_grid.gridoptions.md\":\"12159cad\",\"api_interfaces_features_hotkey.basehotkey.md\":\"87c93210\",\"api_interfaces_features_hotkey.hotkeyoptions.md\":\"240f877f\",\"api_interfaces_features_infoboxes_infobox.baseinfobox.md\":\"581c9595\",\"api_interfaces_features_infoboxes_infobox.infoboxoptions.md\":\"ceb0f16b\",\"api_interfaces_features_links_links.baselinks.md\":\"db88e411\",\"api_interfaces_features_links_links.link.md\":\"1f8b56d9\",\"api_interfaces_features_links_links.linksoptions.md\":\"34093950\",\"api_interfaces_features_milestones_milestone.basemilestone.md\":\"a4424f91\",\"api_interfaces_features_milestones_milestone.milestoneoptions.md\":\"c2a954ae\",\"api_interfaces_features_particles_particles.baseparticles.md\":\"978f46c2\",\"api_interfaces_features_particles_particles.particlesoptions.md\":\"a8603ce6\",\"api_interfaces_features_reset.basereset.md\":\"fcd9163b\",\"api_interfaces_features_reset.resetoptions.md\":\"abee502d\",\"api_interfaces_features_resources_resource.resource.md\":\"c2bcde36\",\"api_interfaces_features_tabs_tab.basetab.md\":\"2c6480cb\",\"api_interfaces_features_tabs_tab.taboptions.md\":\"7986dcab\",\"api_interfaces_features_tabs_tabfamily.basetabbutton.md\":\"c24c4816\",\"api_interfaces_features_tabs_tabfamily.basetabfamily.md\":\"22e55273\",\"api_interfaces_features_tabs_tabfamily.tabbuttonoptions.md\":\"32f789cb\",\"api_interfaces_features_tabs_tabfamily.tabfamilyoptions.md\":\"91afff5f\",\"api_interfaces_features_tooltips_tooltip.basetooltip.md\":\"4cc4cfe5\",\"api_interfaces_features_tooltips_tooltip.tooltipoptions.md\":\"1412a243\",\"api_interfaces_features_trees_tree.basetree.md\":\"77e7830d\",\"api_interfaces_features_trees_tree.basetreenode.md\":\"601b20a4\",\"api_interfaces_features_trees_tree.treebranch.md\":\"cea220f8\",\"api_interfaces_features_trees_tree.treenodeoptions.md\":\"55083fcb\",\"api_interfaces_features_trees_tree.treeoptions.md\":\"f9fddf09\",\"api_interfaces_features_upgrades_upgrade.baseupgrade.md\":\"9181f5b1\",\"api_interfaces_features_upgrades_upgrade.upgradeoptions.md\":\"df9b45bd\",\"api_interfaces_game_events.globalevents.md\":\"3b0cbb6c\",\"api_interfaces_game_layers.baselayer.md\":\"bf53ad74\",\"api_interfaces_game_layers.featurenode.md\":\"7662f7fe\",\"api_interfaces_game_layers.layerevents.md\":\"7231aaaf\",\"api_interfaces_game_layers.layeroptions.md\":\"64e0697d\",\"api_interfaces_game_layers.position.md\":\"0f2f7a8f\",\"api_interfaces_game_modifiers.modifier.md\":\"aa380a14\",\"api_interfaces_game_player.playerdata.md\":\"3815e9e1\",\"api_interfaces_game_settings.settings.md\":\"494b32db\",\"api_interfaces_game_state.transient.md\":\"f702762f\",\"api_interfaces_lib_pwa-register.registerswoptions.md\":\"0ebe17fb\",\"api_modules_data_common.md\":\"fd574bc3\",\"api_modules_data_projentry.md\":\"f13664f5\",\"api_modules_data_themes.md\":\"b3bbcb7b\",\"api_modules_features_achievements_achievement.md\":\"93659f44\",\"api_modules_features_bars_bar.md\":\"510d9d79\",\"api_modules_features_boards_board.md\":\"ccb71705\",\"api_modules_features_buyable.md\":\"4e0c8d7d\",\"api_modules_features_challenges_challenge.md\":\"11f797a2\",\"api_modules_features_clickables_clickable.md\":\"af7a8eb3\",\"api_modules_features_conversion.md\":\"f91e15f7\",\"api_modules_features_feature.md\":\"b1cf96d9\",\"api_modules_features_grids_grid.md\":\"52f4da0a\",\"api_modules_features_hotkey.md\":\"80c415b0\",\"api_modules_features_infoboxes_infobox.md\":\"d62f5c55\",\"api_modules_features_links_links.md\":\"6c56a4e8\",\"api_modules_features_milestones_milestone.md\":\"2799a023\",\"api_modules_features_particles_particles.md\":\"756c3d94\",\"api_modules_features_reset.md\":\"7fd9fa82\",\"api_modules_features_resources_resource.md\":\"d6f388d0\",\"api_modules_features_tabs_tab.md\":\"62c0ef29\",\"api_modules_features_tabs_tabfamily.md\":\"6287f70e\",\"api_modules_features_tooltips_tooltip.md\":\"53d75d6e\",\"api_modules_features_trees_tree.md\":\"abca11f7\",\"api_modules_features_upgrades_upgrade.md\":\"0b3db0aa\",\"api_modules_game_events.md\":\"fd1b1796\",\"api_modules_game_layers.md\":\"ee086086\",\"api_modules_game_modifiers.md\":\"30156e09\",\"api_modules_game_notifications.md\":\"edc8469a\",\"api_modules_game_persistence.md\":\"4b492b59\",\"api_modules_game_player.md\":\"96f7e039\",\"api_modules_game_settings.md\":\"f06d7d54\",\"api_modules_game_state.md\":\"c71b4885\",\"api_modules_lib_break_eternity.md\":\"bca8ed77\",\"api_modules_lib_pwa-register.md\":\"c86339c2\",\"api_modules_util_bignum.md\":\"99ba0199\",\"api_modules_util_break_eternity.md\":\"7e7decd7\",\"api_modules_util_common.md\":\"7e23d796\",\"api_modules_util_computed.md\":\"6595ed7c\",\"api_modules_util_proxies.md\":\"ee20447a\",\"api_modules_util_save.md\":\"616d2a4c\",\"api_modules_util_vue.md\":\"a114f517\",\"guide_changelog.md\":\"9a2d2455\",\"guide_coercable.md\":\"cc5ff21a\",\"guide_creating-features.md\":\"e1f7eca5\",\"guide_dynamic-layers.md\":\"b518d1bf\",\"guide_examples.md\":\"0d839674\",\"guide_features.md\":\"2d720b22\",\"guide_index.md\":\"1d64864e\",\"guide_layers.md\":\"96612801\",\"guide_persistence.md\":\"779a1143\",\"guide_project-entry.md\":\"ca85e0a8\",\"guide_project-info.md\":\"810f91ae\",\"guide_reactivity.md\":\"808d40d2\",\"guide_setup.md\":\"2f80c93e\",\"guide_themes.md\":\"27233252\",\"guide_updating.md\":\"5f192030\",\"guide_utils.md\":\"d6cc5548\",\"index.md\":\"1ef0e258\"}")</script>
<script type="module" async src="/assets/app.7cfe4cf0.js"></script>
</body>
</html>