@json-eval-rs/webcore 0.0.34 → 0.0.36
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/index.d.ts +2 -0
- package/index.js +5 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -156,7 +156,7 @@ export class JSONEvalCore {
|
|
|
156
156
|
return this._instance.evaluateJS(
|
|
157
157
|
JSON.stringify(data),
|
|
158
158
|
context ? JSON.stringify(context) : null,
|
|
159
|
-
paths
|
|
159
|
+
paths || null
|
|
160
160
|
);
|
|
161
161
|
} catch (error) {
|
|
162
162
|
throw new Error(`Evaluation failed: ${error.message || error}`);
|
|
@@ -535,14 +535,16 @@ export class JSONEvalCore {
|
|
|
535
535
|
* @param {string} options.subformPath - Path to the subform (e.g., "#/riders")
|
|
536
536
|
* @param {object} options.data - Data for the subform
|
|
537
537
|
* @param {object} [options.context] - Optional context
|
|
538
|
+
* @param {Array<string>} [options.paths] - Optional array of paths to evaluate
|
|
538
539
|
* @returns {Promise<void>}
|
|
539
540
|
*/
|
|
540
|
-
async evaluateSubform({ subformPath, data, context }) {
|
|
541
|
+
async evaluateSubform({ subformPath, data, context, paths }) {
|
|
541
542
|
await this.init();
|
|
542
543
|
return this._instance.evaluateSubform(
|
|
543
544
|
subformPath,
|
|
544
545
|
JSON.stringify(data),
|
|
545
|
-
context ? JSON.stringify(context) : null
|
|
546
|
+
context ? JSON.stringify(context) : null,
|
|
547
|
+
paths || null
|
|
546
548
|
);
|
|
547
549
|
}
|
|
548
550
|
|