-
-
Notifications
You must be signed in to change notification settings - Fork 205
Expand file tree
/
Copy pathjsonpath-node.js
More file actions
85 lines (82 loc) · 2.13 KB
/
Copy pathjsonpath-node.js
File metadata and controls
85 lines (82 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import vm from 'vm';
import {JSONPath, JSONPathClass} from './jsonpath.js';
/**
* @typedef {import('./jsonpath.js').AnyInput} AnyInput
*/
/**
* @typedef {import('./jsonpath.js').SandboxCallback} SandboxCallback
*/
/**
* @typedef {import('./jsonpath.js').SandboxPropertyValue} SandboxPropertyValue
*/
/**
* @typedef {import('./jsonpath.js').ExpressionArray} ExpressionArray
*/
/**
* @typedef {import('./jsonpath.js').ValueType} ValueType
*/
/**
* @typedef {import('./jsonpath.js').ParentValue} ParentValue
*/
/**
* @typedef {import('./jsonpath.js').UnknownResult} UnknownResult
*/
/**
* @typedef {import('./jsonpath.js').ParentProperty} ParentProperty
*/
/**
* @typedef {import('./jsonpath.js').PreferredOutput} PreferredOutput
*/
/**
* @typedef {import('./jsonpath.js').ReturnObject} ReturnObject
*/
/**
* @typedef {import('./jsonpath.js').JSONPathCallback} JSONPathCallback
*/
/**
* @typedef {import('./jsonpath.js').OtherTypeCallback} OtherTypeCallback
*/
/**
* @typedef {import('./jsonpath.js').ContextItem} ContextItem
*/
/**
* @typedef {import('./jsonpath.js').EvaluatedResult} EvaluatedResult
*/
/**
* @typedef {import('./jsonpath.js').EvalCallback} EvalCallback
*/
/**
* @typedef {import('./jsonpath.js').EvalClass} EvalClass
*/
/**
* @typedef {import('./jsonpath.js').ResultType} ResultType
*/
/**
* @typedef {import('./jsonpath.js').EvalValue} EvalValue
*/
/**
* @typedef {import('./jsonpath.js').PathType} PathType
*/
/**
* @typedef {import('./jsonpath.js').SafeScriptType} SafeScriptType
*/
/**
* @typedef {import('./jsonpath.js').ScriptType} ScriptType
*/
/**
* @typedef {import('./jsonpath.js').SandboxType} SandboxType
*/
/**
* @typedef {import('./jsonpath.js').JSONPathOptions} JSONPathOptions
*/
// Node's vm module shape is wider than ScriptType, but is compatible for
// the properties actually used (Script) -- kept Node-specific here so
// `node:vm` types don't leak into the shared/browser declarations.
/** @type {{vm: ScriptType}} */
(/** @type {unknown} */ (JSONPathClass.prototype)).vm =
/** @type {ScriptType} */ (
/** @type {unknown} */ (vm)
);
export {
JSONPath, JSONPathClass
};