Skip to content

🧰 Helper Functions

Andre Kless edited this page Mar 27, 2026 · 17 revisions

The ccm.helper namespace provides utility functions used internally by the framework and available to component developers. This page gives an overview of available helper functions and their purpose.

πŸ‘‰ For detailed behavior, parameters, and edge cases, refer to the actual implementation in the source code.

All helpers are available via:

ccm.helper.<function>

🧱 Data & Object Utilities

Function Description
clone Creates a deep copy of a value
deepValue Gets, sets, or deletes nested values via dot notation
integrate Merges priority data into a dataset
mapObject Maps values from one object structure to another
stringify Serializes a value into JSON

πŸ“¦ Data Handling

Function Description
datasetsToStore Converts datasets into store-compatible format
generateKey Generates a unique key
runQuery Filters objects using a query

πŸ”— Dependency System

Function Description
prepareConfig Prepares configuration before dependency resolution
solveDependencies Resolves dependencies in a structure
solveDependency Resolves a single dependency

βš™οΈ Framework Integration

Function Description
embed Embeds a component in a DOM element based on declarative configuration
loading Creates a loading indicator element
parseComponentURL Extracts metadata from a component URL

🧭 Instance Navigation

Function Description
findInAncestors Searches for a property in the instance hierarchy
findRoot Returns the root instance

πŸ” Validation

Function Description
isComponent Checks if a value is a ccmjs component
isDataset Checks if a value is a dataset
isDependency Checks if a value is a dependency
isInstance Checks if a value is a component instance
isKey Checks if a value is a valid key
isNonCloneable Checks if a value should not be cloned
isObject Checks if a value is an object
isStore Checks if a value is a datastore accessor

Clone this wiki locally