fig-tree-evaluator 2.0.3 → 2.0.4
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/README.md +1 -6
- package/build/operators/customFunctions.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -846,11 +846,6 @@ e.g.
|
|
|
846
846
|
`children` array: `[value, delimiter]`
|
|
847
847
|
(`trimWhiteSpace` and `excludeTrailing` not available, since array can only support one optional parameter)
|
|
848
848
|
|
|
849
|
-
- `urlObject`: either a url string, or an object structured as `{url: <string>, headers: <object>}` (if additional headers are required)
|
|
850
|
-
- `parameterKeys`: an array of strings representing the keys of any query parameters
|
|
851
|
-
- `...values`: one value for each key specified in `parameterKeys`
|
|
852
|
-
- `returnProperty` (optional): as above
|
|
853
|
-
|
|
854
849
|
---
|
|
855
850
|
### GET
|
|
856
851
|
|
|
@@ -1250,7 +1245,7 @@ Please open an issue: https://github.com/CarlosNZ/fig-tree-evaluator/issues
|
|
|
1250
1245
|
|
|
1251
1246
|
## Changelog
|
|
1252
1247
|
|
|
1253
|
-
|
|
1248
|
+
- **v2.0.4**: Backwards compatibility for customFunctions (#53)
|
|
1254
1249
|
- **v2.0.1**: Add deep equality comparison for objects/arrayr in =/!= operators
|
|
1255
1250
|
- **v2.0.0**: Re-write as stand-alone package. Major improvements include:
|
|
1256
1251
|
- more [operators](#operator-reference)
|
|
@@ -33,11 +33,11 @@ const propertyAliases = {
|
|
|
33
33
|
variables: 'args',
|
|
34
34
|
};
|
|
35
35
|
const evaluate = (expression, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
-
var _a;
|
|
36
|
+
var _a, _b;
|
|
37
37
|
const [functionPath, ...args] = (yield (0, _operatorUtils_1.evaluateArray)([expression.functionPath, ...(expression.args || [])], config));
|
|
38
38
|
config.typeChecker({ name: 'functionPath', value: functionPath, expectedType: 'string' });
|
|
39
39
|
const { objects, functions } = config.options;
|
|
40
|
-
const func = ((_a = (0, object_property_extractor_1.default)(functions, functionPath, null)) !== null && _a !== void 0 ? _a : (0, object_property_extractor_1.default)(objects, functionPath));
|
|
40
|
+
const func = ((_b = (_a = (0, object_property_extractor_1.default)(functions, functionPath, null)) !== null && _a !== void 0 ? _a : (0, object_property_extractor_1.default)(objects, functionPath, null)) !== null && _b !== void 0 ? _b : (0, object_property_extractor_1.default)(config.options, functionPath));
|
|
41
41
|
return yield func(...args);
|
|
42
42
|
});
|
|
43
43
|
const parseChildren = (expression) => {
|