jexp 0.0.9 → 0.0.12
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 +375 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,381 @@
|
|
|
1
1
|
# JEXP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command line application that allows parser and evaluator of json/yaml applying expressions.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Functions and arrow functions
|
|
8
|
+
- Constants, enums, variables, objects and arrays
|
|
9
|
+
- Arithmetic, assignment, comparison, Logical and bitwise operators
|
|
10
|
+
- Environment variables
|
|
11
|
+
|
|
12
|
+
## Global installation
|
|
13
|
+
|
|
14
|
+
it is necessary to install the package globally to be able to access the command line applications.
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install jexp -g
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
jexp <expression> <source> [options]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Expression
|
|
27
|
+
|
|
28
|
+
The expressions correspond to the package [js-expressions](https://www.npmjs.com/package/js-expressions)
|
|
29
|
+
|
|
30
|
+
expression that is applied to the data source
|
|
31
|
+
|
|
32
|
+
the root of the data is accessed from **dot**
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
jexp '.' ./data/orders.json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
From the **dot** we write the expressions
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
jexp '.details.article' ./data/orders.json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
jexp '.details.first(p=> p.unitPrice * p.qty < 3 )' ./data/orders.json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Source
|
|
49
|
+
|
|
50
|
+
Get data source from json file
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
jexp '.[0].details' ./data/orders.json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Get data source from yaml file
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
jexp '.min(p=> p.total)' ./data/orders.yaml
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Get data source from json stringify
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
jexp 'concatenate(capitalize(.fruit.name)," ",.fruit.color)' '{"fruit":{"name":"apple","color":"green","price":1.20}}'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Get data source from pipeline command
|
|
4
69
|
|
|
5
70
|
```sh
|
|
6
71
|
curl -s https://raw.githubusercontent.com/FlavioLionelRita/jexp/main/data/orders.json | jexp '.number'
|
|
7
72
|
```
|
|
73
|
+
|
|
74
|
+
### Options
|
|
75
|
+
|
|
76
|
+
| Option | Abbreviation | Description | Options |
|
|
77
|
+
|-------------------|--------------|----------------|-----------|
|
|
78
|
+
|--output <format> |-o |Force output | json, yaml|
|
|
79
|
+
|--beautiful |-b |Beautiful output| |
|
|
80
|
+
|--decorate |-d |Decorate output | |
|
|
81
|
+
|
|
82
|
+
## Examples
|
|
83
|
+
|
|
84
|
+
file orders.js
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
[
|
|
88
|
+
{
|
|
89
|
+
"number": "20001",
|
|
90
|
+
"customer": {"firstName":"John", "lastName":"Murphy"},
|
|
91
|
+
"orderTime": "2022-07-30T10:15:54",
|
|
92
|
+
"total": 12.19,
|
|
93
|
+
"details": [
|
|
94
|
+
{"article":"Potato", "unitPrice":1.54,"qty":5},
|
|
95
|
+
{"article":"Onion", "unitPrice":1.23, "qty":2},
|
|
96
|
+
{"article":"White grape", "unitPrice":2.03, "qty":1}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"number": "20002",
|
|
101
|
+
"customer": {"firstName":"Paul", "lastName":"Smith"},
|
|
102
|
+
"orderTime": "2022-07-30T12:12:43",
|
|
103
|
+
"total": 7.91,
|
|
104
|
+
"details": [
|
|
105
|
+
{"article":"Apple", "unitPrice":2.15, "qty":1},
|
|
106
|
+
{"article":"Banana", "unitPrice":1.99, "qty":2},
|
|
107
|
+
{"article":"Pear", "unitPrice":1.78, "qty":1}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Return the entire content of the file
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
jexp '.' ./data/orders.json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Result:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
[{"number":"20001","customer":{"firstName":"John","lastName":"Murphy"},"orderTime":"2022-07-30T10:15:54","total":12.19,"details":[{"article":"Potato","unitPrice":1.54,"qty":5},{"article":"Onion","unitPrice":1.23,"qty":2},{"article":"White grape","unitPrice":2.03,"qty":1}]},{"number":"20002","customer":{"firstName":"Paul","lastName":"Smith"},"orderTime":"2022-07-30T12:12:43","total":7.91,"details":[{"article":"Apple","unitPrice":2.15,"qty":1},{"article":"Banana","unitPrice":1.99,"qty":2},{"article":"Pear","unitPrice":1.78,"qty":1}]}]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Returns the number property of the list
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
jexp '.number' ./data/orders.json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Result:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
["20001","20002"]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Concatenates two properties and capitalizes the first one
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
jexp 'concatenate(capitalize(.fruit.name)," ",.fruit.color)' '{"fruit":{"name":"apple","color":"green","price":1.20}}'
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Result:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
"Apple green"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Returns the first element of an array from the index in yaml format
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
jexp '.[0]' ./data/orders.json -o yaml
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Result:
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
number: '20001'
|
|
159
|
+
customer:
|
|
160
|
+
firstName: John
|
|
161
|
+
lastName: Murphy
|
|
162
|
+
orderTime: '2022-07-30T10:15:54'
|
|
163
|
+
total: 12.19
|
|
164
|
+
details:
|
|
165
|
+
- article: Potato
|
|
166
|
+
unitPrice: 1.54
|
|
167
|
+
qty: 5
|
|
168
|
+
- article: Onion
|
|
169
|
+
unitPrice: 1.23
|
|
170
|
+
qty: 2
|
|
171
|
+
- article: White grape
|
|
172
|
+
unitPrice: 2.03
|
|
173
|
+
qty: 1
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Returns the details property of the first element in beautiful format
|
|
177
|
+
|
|
178
|
+
```sh
|
|
179
|
+
jexp '.[0].details' ./data/orders.json -b
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Result:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
[
|
|
186
|
+
{
|
|
187
|
+
"article": "Potato",
|
|
188
|
+
"unitPrice": 1.54,
|
|
189
|
+
"qty": 5
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"article": "Onion",
|
|
193
|
+
"unitPrice": 1.23,
|
|
194
|
+
"qty": 2
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"article": "White grape",
|
|
198
|
+
"unitPrice": 2.03,
|
|
199
|
+
"qty": 1
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Returns the details property of the listing
|
|
205
|
+
|
|
206
|
+
```sh
|
|
207
|
+
jexp '.details' ./data/orders.json
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Result:
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
[{"article":"Potato","unitPrice":1.54,"qty":5},{"article":"Onion","unitPrice":1.23,"qty":2},{"article":"White grape","unitPrice":2.03,"qty":1},{"article":"Apple","unitPrice":2.15,"qty":1},{"article":"Banana","unitPrice":1.99,"qty":2},{"article":"Pear","unitPrice":1.78,"qty":1}]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Returns the article property of the list of details of each element of the list
|
|
217
|
+
|
|
218
|
+
```sh
|
|
219
|
+
jexp '.details.article' ./data/orders.json
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Result:
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
["Potato","Onion","White grape","Apple","Banana","Pear"]
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Get the minimum of the total property
|
|
229
|
+
|
|
230
|
+
```sh
|
|
231
|
+
jexp '.min(p=> p.total)' ./data/orders.json
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Result:
|
|
235
|
+
|
|
236
|
+
```json
|
|
237
|
+
7.91
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Get the minimum of the article property from all the details
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
jexp '.details.min(p=> p.article )' ./data/orders.json
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Result:
|
|
247
|
+
|
|
248
|
+
```json
|
|
249
|
+
"Apple"
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Get the maximum "unitPrice * p.qty" from all the details
|
|
253
|
+
|
|
254
|
+
```sh
|
|
255
|
+
jexp '.details.max(p=> p.unitPrice * p.qty )' ./data/orders.json
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Result:
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
7.7
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Get the middle value "unitPrice * p.qty" from all the details
|
|
265
|
+
|
|
266
|
+
```sh
|
|
267
|
+
jexp '.details.avg(p=> p.unitPrice * p.qty )' ./data/orders.json
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Result:
|
|
271
|
+
|
|
272
|
+
```json
|
|
273
|
+
3.35
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Gets the sum of the total property
|
|
277
|
+
|
|
278
|
+
```sh
|
|
279
|
+
jexp '.sum(p=> p.total )' ./data/orders.json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Result:
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
20.1
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Get the sum "unitPrice * p.qty" of the details of item 1 of the list
|
|
289
|
+
|
|
290
|
+
```sh
|
|
291
|
+
jexp '.[1].details.sum(p=> p.unitPrice * p.qty )' ./data/orders.json
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Result:
|
|
295
|
+
|
|
296
|
+
```json
|
|
297
|
+
7.91
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Get the number of details where "unitPrice * p.qty " is less than 3
|
|
301
|
+
|
|
302
|
+
```sh
|
|
303
|
+
jexp '.details.count(p=> p.unitPrice * p.qty < 3 )' ./data/orders.json
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Result:
|
|
307
|
+
|
|
308
|
+
```json
|
|
309
|
+
4
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Get the first article property of all details where "unitPrice * p.qty" is less than 3
|
|
313
|
+
|
|
314
|
+
```sh
|
|
315
|
+
jexp '.details.first(p=> p.unitPrice * p.qty < 3 ).article' ./data/orders.json
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Result:
|
|
319
|
+
|
|
320
|
+
```json
|
|
321
|
+
"Onion"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Get the last article property of all details where "unitPrice * p.qty" is less than 3
|
|
325
|
+
|
|
326
|
+
```sh
|
|
327
|
+
jexp '.details.last(p=> p.unitPrice * p.qty < 3 ).article' ./data/orders.json
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Result:
|
|
331
|
+
|
|
332
|
+
```json
|
|
333
|
+
"Pear"
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Get the first detail where "unitPrice * p.qty" is less than 3 in beautiful format
|
|
337
|
+
|
|
338
|
+
```sh
|
|
339
|
+
jexp '.details.first(p=> p.unitPrice * p.qty < 3 )' ./data/orders.json -b
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Result:
|
|
343
|
+
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"article": "Onion",
|
|
347
|
+
"unitPrice": 1.23,
|
|
348
|
+
"qty": 2
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Get the sum "unitPrice * p.qty" of the details of item 1 of the list using pipeline
|
|
353
|
+
|
|
354
|
+
```sh
|
|
355
|
+
curl -s https://raw.githubusercontent.com/FlavioLionelRita/jexp/main/data/orders.json | jexp '.details.sum(p=> p.unitPrice * p.qty )'
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Result:
|
|
359
|
+
|
|
360
|
+
```json
|
|
361
|
+
20.1
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
## js-expression
|
|
365
|
+
|
|
366
|
+
[Js-expression](https://www.npmjs.com/package/js-expressions) is an extensible expression evaluator and parser. \
|
|
367
|
+
Besides the operators, functions, variables, objects and arrays that are supported
|
|
368
|
+
|
|
369
|
+
### Documentation
|
|
370
|
+
|
|
371
|
+
- [Array](https://github.com/FlavioLionelRita/js-expressions/wiki/Array)
|
|
372
|
+
- [Assignment](https://github.com/FlavioLionelRita/js-expressions/wiki/Assignment)
|
|
373
|
+
- [Bitwise](https://github.com/FlavioLionelRita/js-expressions/wiki/Bitwise)
|
|
374
|
+
- [Comparison](https://github.com/FlavioLionelRita/js-expressions/wiki/Comparison)
|
|
375
|
+
- [Control flows](https://github.com/FlavioLionelRita/js-expressions/wiki/Flows)
|
|
376
|
+
- [Datetime](https://github.com/FlavioLionelRita/js-expressions/wiki/Datetime)
|
|
377
|
+
- [Extend](https://github.com/FlavioLionelRita/js-expressions/wiki/Extend)
|
|
378
|
+
- [Logical](https://github.com/FlavioLionelRita/js-expressions/wiki/Logical)
|
|
379
|
+
- [Nullable](https://github.com/FlavioLionelRita/js-expressions/wiki/Nullable)
|
|
380
|
+
- [Numeric](https://github.com/FlavioLionelRita/js-expressions/wiki/Numeric)
|
|
381
|
+
- [String](https://github.com/FlavioLionelRita/js-expressions/wiki/String)
|
package/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
18
18
|
const { program, Option } = require('commander');
|
|
19
19
|
const colorize = require('json-colorizer');
|
|
20
20
|
const yaml = require('js-yaml');
|
|
21
|
-
const run = (
|
|
21
|
+
const run = (expression, source, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
22
|
try {
|
|
23
23
|
let data = {};
|
|
24
24
|
let extension = '';
|
|
@@ -44,7 +44,7 @@ const run = (query, source, options) => __awaiter(void 0, void 0, void 0, functi
|
|
|
44
44
|
if (data === null || data === undefined) {
|
|
45
45
|
throw Error(`can not parse content of ${source}`);
|
|
46
46
|
}
|
|
47
|
-
const result = js_expressions_1.expressions.eval(
|
|
47
|
+
const result = js_expressions_1.expressions.eval(expression, { '.': data });
|
|
48
48
|
const forceJson = options.output === 'json';
|
|
49
49
|
const forceYaml = options.output === 'yaml';
|
|
50
50
|
if (forceYaml || (!forceJson && extension && ['.yaml', 'yml'].includes(extension))) {
|
|
@@ -82,15 +82,15 @@ const getInput = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
82
82
|
function main() {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
84
|
program
|
|
85
|
-
.argument('<
|
|
85
|
+
.argument('<expression>')
|
|
86
86
|
.argument('[source]')
|
|
87
87
|
.addOption(new Option('-o, --output <format>', 'Force output').choices(['json', 'yaml']))
|
|
88
|
-
.option('-b, --beautiful', 'Beautiful output',
|
|
88
|
+
.option('-b, --beautiful', 'Beautiful output', false)
|
|
89
89
|
.option('-d, --decorate', 'Decorate output', false)
|
|
90
90
|
.option('-q, --query-file <path>', 'query file')
|
|
91
|
-
.action((
|
|
91
|
+
.action((expression, source, options) => __awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
const data = (source !== undefined) ? source : yield getInput();
|
|
93
|
-
yield run(
|
|
93
|
+
yield run(expression, data, options);
|
|
94
94
|
}));
|
|
95
95
|
yield program.parseAsync(process.argv);
|
|
96
96
|
});
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAA2D;AAC3D,gDAAuB;AACvB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;AAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AAE/B,MAAM,GAAG,GAAG,CAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAA2D;AAC3D,gDAAuB;AACvB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;AAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AAE/B,MAAM,GAAG,GAAG,CAAO,UAAiB,EAAE,MAAa,EAAE,OAAW,EAAE,EAAE;IACnE,IAAI;QACH,IAAI,IAAI,GAAO,EAAE,CAAA;QACjB,IAAI,SAAS,GAAG,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ACpB,SAAS,CAAC,IAAI,MAAM,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;aACxF,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,KAAK,CAAC;aACpD,MAAM,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,CAAC;aAClD,MAAM,CAAC,yBAAyB,EAAE,YAAY,CAAC;aAC/C,MAAM,CAAC,CAAO,UAAiB,EAAE,MAAU,EAAE,OAAW,EAAE,EAAE;YAC5D,MAAM,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,QAAQ,EAAS,CAAA;YACtE,MAAM,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACrC,CAAC,CAAA,CAAC,CAAA;QACH,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;CAAA;AACD,IAAI,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jexp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Parser and evaluator of expressions by line of commands. The expressions correspond to the package js-expressions",
|
|
5
5
|
"author": "Flavio Lionel Rita <flaviolrita@hotmail.com>",
|
|
6
6
|
"license": "Apache-2.0 License",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"commander": "^9.4.0",
|
|
21
|
-
"js-expressions": "1.0.
|
|
21
|
+
"js-expressions": "1.0.10",
|
|
22
22
|
"js-yaml": "^4.1.0",
|
|
23
23
|
"json-colorizer": "^2.2.2"
|
|
24
24
|
},
|