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.
Files changed (2) hide show
  1. package/lib/library.js +4 -5
  2. 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 globals: Optional (default is null). The global variables object.
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_, globals] = valueArgsValidate(barescriptEvaluateExpressionArgs, args);
404
+ const [expr, locals_, builtins] = valueArgsValidate(barescriptEvaluateExpressionArgs, args);
405
405
  validateExpression(expr);
406
- const evaluateOptions = (globals === null ? options : {...options, 'globals': globals});
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': 'globals', 'type': 'object', 'nullable': true}
412
+ {'name': 'builtins', 'type': 'boolean', 'default': true}
414
413
  ]);
415
414
 
416
415
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "bare-script",
4
- "version": "3.8.21",
4
+ "version": "3.8.23",
5
5
  "description": "BareScript; a lightweight scripting and expression language",
6
6
  "keywords": [
7
7
  "expression",