DECCF · Cash Flow Modeler and Calculator

Extend a model with a pack

A pack is a JavaScript function that receives a model and public API factories, then returns declarations to add. Packs can package reusable industry- or workflow-specific declarations and calculations.

Extraction moves declarations from a higher-level domain abstraction into the model. The extraction function runs twice against the same frozen model so the engine can compare its contributions. Avoid clocks, randomness, network calls, or other side effects when creating declarations. Pack names use lowercase letters, digits, and hyphens; versions follow semantic-version syntax.

extractPacks() retains existing model declarations and adds the pack's contributions. Name conflicts are rejected. Pass the resulting model to compileModel() or run().

See the Pack reference for details and current constraints.