ESCalc - v0.0.1-beta.2
    Preparing search index...

    Type Alias EvaluateOptions

    Options for evaluate and evaluateSafe.

    type EvaluateOptions = {
        calculator?: Calculator;
        functions?: Map<string, ExpressionFunction>;
        lazyParams?: Map<string, LazyParameter>;
        params?: Map<string, Parameter>;
        stopOnFirstError?: boolean;
    }
    Index

    Properties

    calculator?: Calculator

    Custom operator implementation. Defaults to StandardCalculator. Override to change how operators behave - for example to support arbitrary-precision arithmetic via a library such as Decimal.js.

    functions?: Map<string, ExpressionFunction>

    Custom functions available by name within expressions.

    lazyParams?: Map<string, LazyParameter>

    Named parameters whose values are computed on demand the first time they are referenced.

    params?: Map<string, Parameter>

    Named parameter values available during expression evaluation. Keys are parameter names used in the expression - without surrounding brackets.

    new Map([['x', 10], ['label', 'hello']])
    
    stopOnFirstError?: boolean

    Stop parsing on the first recoverable error when expression is provided as a string.

    true