Helpers
Static Member Summary
Static Public Members | ||
public static |
applyCeiling: * |
Static Method Summary
Static Public Methods | ||
public static |
calculateFormula(formula: string, valuesMap: Object<string, number|boolean|string>, options: object): number | boolean | string Calculate the value of the given formula |
|
public static |
Converts any value to a finite number. |
|
public static |
evalExpression(formula: string, valueMap: object): boolean Evaluate the logical expression |
|
public static |
Determines if value is a finite number. |
|
public static |
parseFormulaArguments(formula: string): string[] Parse the variables referenced in a formula |
|
public static |
union(iterables: ...*): * |
|
public static |
validateFormula(formula: *, valuesMap: *): * FIXME don't think there is a good way to validate without just eval'ing with the variables substituted in. |
Constructor Summary
Public Constructor | ||
public |
|
Static Public Members
public static applyCeiling: * source
Static Public Methods
public static calculateFormula(formula: string, valuesMap: Object<string, number|boolean|string>, options: object): number | boolean | string source
Calculate the value of the given formula
public static confirmNumber(val: number | string | boolean, dflt: number): number source
Converts any value to a finite number. If the value can not be converted it will use the default value. Booleans are converted to 1 or 0.
public static evalExpression(formula: string, valueMap: object): boolean source
Evaluate the logical expression
public static isNumber(val: string | number): boolean source
Determines if value is a finite number.
public static parseFormulaArguments(formula: string): string[] source
Parse the variables referenced in a formula
Params:
Name | Type | Attribute | Description |
formula | string |
public static union(iterables: ...*): * source
Params:
Name | Type | Attribute | Description |
iterables | ...* |
Return:
* |
public static validateFormula(formula: *, valuesMap: *): * source
FIXME don't think there is a good way to validate without just eval'ing with the variables substituted in.
Params:
Name | Type | Attribute | Description |
formula | * | ||
valuesMap | * |
Return:
* |