bare-script 3.8.21 → 3.8.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/library.js +4 -5
- package/package.json +1 -1
package/lib/library.js
CHANGED
|
@@ -398,19 +398,18 @@ const arraySortArgs = valueArgsModel([
|
|
|
398
398
|
// $doc: Evaluate a [BareScript expression model](../model/#var.vName='Expression')
|
|
399
399
|
// $arg expr: The [BareScript expression model](../model/#var.vName='Expression')
|
|
400
400
|
// $arg locals: Optional (default is null). The local variables object.
|
|
401
|
-
// $arg
|
|
401
|
+
// $arg builtins: Optional (default is true). If true, include the [built-in expression functions](expression.html).
|
|
402
402
|
// $return: The expression result
|
|
403
403
|
function barescriptEvaluateExpression(args, options) {
|
|
404
|
-
const [expr, locals_,
|
|
404
|
+
const [expr, locals_, builtins] = valueArgsValidate(barescriptEvaluateExpressionArgs, args);
|
|
405
405
|
validateExpression(expr);
|
|
406
|
-
|
|
407
|
-
return evaluateExpression(expr, evaluateOptions, locals_, false);
|
|
406
|
+
return evaluateExpression(expr, options, locals_, builtins);
|
|
408
407
|
}
|
|
409
408
|
|
|
410
409
|
const barescriptEvaluateExpressionArgs = valueArgsModel([
|
|
411
410
|
{'name': 'expr', 'type': 'object'},
|
|
412
411
|
{'name': 'locals', 'type': 'object', 'nullable': true},
|
|
413
|
-
{'name': '
|
|
412
|
+
{'name': 'builtins', 'type': 'boolean', 'default': true}
|
|
414
413
|
]);
|
|
415
414
|
|
|
416
415
|
|