json10 13.1.44 → 16.0.46

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 (36) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/{esm2020 → esm2022}/json10.mjs +4 -4
  3. package/{client/esm2020 → browser/esm2022}/lib/index.mjs +53 -53
  4. package/browser/{esm2020 → esm2022}/public-api.mjs +1 -1
  5. package/{client/fesm2015 → browser/fesm2022}/json10.mjs +51 -51
  6. package/browser/{json10.d.ts → index.d.ts} +4 -4
  7. package/browser/lib/index.d.ts +14 -14
  8. package/browser/package.json +6 -12
  9. package/client/{esm2020 → esm2022}/json10.mjs +4 -4
  10. package/{browser/esm2020 → client/esm2022}/lib/index.mjs +53 -53
  11. package/client/{esm2020 → esm2022}/public-api.mjs +1 -1
  12. package/{browser/fesm2020 → client/fesm2022}/json10.mjs +51 -51
  13. package/client/{json10.d.ts → index.d.ts} +4 -4
  14. package/client/lib/index.d.ts +14 -14
  15. package/client/package.json +89 -85
  16. package/index.d.ts +1 -1
  17. package/lib/index.d.ts +15 -15
  18. package/package.json +3 -3
  19. package/package.json_tnp.json5 +1 -1
  20. package/tmp-environment.json +94 -90
  21. package/websql/{esm2020 → esm2022}/json10.mjs +4 -4
  22. package/websql/{esm2020 → esm2022}/lib/index.mjs +53 -53
  23. package/websql/{esm2020 → esm2022}/public-api.mjs +1 -1
  24. package/websql/{fesm2015 → fesm2022}/json10.mjs +51 -51
  25. package/websql/{json10.d.ts → index.d.ts} +4 -4
  26. package/websql/lib/index.d.ts +14 -14
  27. package/websql/package.json +6 -12
  28. package/browser/fesm2015/json10.mjs +0 -61
  29. package/client/fesm2015/json10.mjs.map +0 -1
  30. package/client/fesm2020/json10.mjs +0 -61
  31. package/client/fesm2020/json10.mjs.map +0 -1
  32. package/websql/fesm2020/json10.mjs +0 -61
  33. package/websql/fesm2020/json10.mjs.map +0 -1
  34. /package/browser/{fesm2015 → fesm2022}/json10.mjs.map +0 -0
  35. /package/{browser/fesm2020 → client/fesm2022}/json10.mjs.map +0 -0
  36. /package/websql/{fesm2015 → fesm2022}/json10.mjs.map +0 -0
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "smartContainerTarget": "",
28
28
  "type": "isomorphic-lib",
29
- "version": "v3",
29
+ "version": "v4",
30
30
  "additionalNpmNames": [
31
31
  "firedev-json"
32
32
  ],
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "name": "json10",
50
50
  "description": "Handle circural references, comments and many more inside JSON",
51
- "version": "13.1.44",
51
+ "version": "16.0.46",
52
52
  "scripts": {
53
53
  "test": "mocha --require ts-node/register src/**/*.spec.ts",
54
54
  "test:watch": "mocha --compilers ts-node/register src/**/*.spec.ts --watch"
@@ -68,51 +68,54 @@
68
68
  },
69
69
  "homepage": "https://github.com/darekf77/json10#readme",
70
70
  "dependencies": {
71
- "lodash-walk-object": "~13.1.44"
71
+ "lodash-walk-object": "~16.0.46"
72
72
  },
73
73
  "license": "MIT",
74
74
  "private": false,
75
- "lastBuildTagHash": "81100ef6e51faf630a26e8a67abba06260697806",
75
+ "lastBuildTagHash": "3e6591b0a3cea51cb9036823366c2d286dc57d5d",
76
76
  "devDependencies": {
77
- "@angular-devkit/build-angular": "~13.3.9",
78
- "@angular-devkit/core": "~13.3.9",
77
+ "@angular-devkit/build-angular": "~16.0.5",
78
+ "@angular-devkit/core": "~16.0.5",
79
79
  "@angular-material-extensions/fab-menu": "~6.1.0",
80
- "@angular/animations": "~13.3.0",
81
- "@angular/cdk": "~13.3.9",
82
- "@angular/cli": "~13.3.9",
83
- "@angular/common": "~13.3.0",
84
- "@angular/compiler": "~13.3.0",
85
- "@angular/compiler-cli": "~13.3.0",
86
- "@angular/core": "~13.3.0",
87
- "@angular/flex-layout": "~13.0.0-beta.38",
88
- "@angular/forms": "~13.3.0",
89
- "@angular/material": "~13.3.9",
90
- "@angular/platform-browser": "~13.3.0",
91
- "@angular/platform-browser-dynamic": "~13.3.0",
92
- "@angular/pwa": "~13.3.9",
93
- "@angular/router": "~13.3.0",
94
- "@angular/service-worker": "~13.3.11",
80
+ "@angular/animations": "~16.0.0",
81
+ "@angular/cdk": "~16.0.3",
82
+ "@angular/cli": "~16.0.5",
83
+ "@angular/common": "~16.0.0",
84
+ "@angular/compiler": "~16.0.0",
85
+ "@angular/compiler-cli": "~16.0.4",
86
+ "@angular/core": "~16.0.0",
87
+ "@angular/elements": "~16.0.4",
88
+ "@angular/forms": "~16.0.0",
89
+ "@angular/material": "~16.0.3",
90
+ "@angular/platform-browser": "~16.0.4",
91
+ "@angular/platform-browser-dynamic": "~16.0.4",
92
+ "@angular/pwa": "~16.0.5",
93
+ "@angular/router": "~16.0.0",
94
+ "@angular/service-worker": "~16.0.4",
95
95
  "@babel/cli": "7.18.6",
96
96
  "@iconify/icons-fa-solid": "1.2.2",
97
97
  "@iconify/icons-mdi": "1.2.1",
98
- "@mdi/js": "6.5.95",
99
- "@ng-matero/extensions": "13.3.2",
98
+ "@mdi/js": "7.2.96",
99
+ "@ng-matero/extensions": "16.0.0",
100
100
  "@ngneat/falso": "6.4.0",
101
- "@ngneat/hot-toast": "4",
102
- "@ngneat/overview": "3.0.0",
103
- "@ngneat/until-destroy": "9.2.3",
104
- "@ngrx/component-store": "~13.0.2",
105
- "@ngrx/data": "~13.0.2",
106
- "@ngrx/effects": "~13.0.2",
107
- "@ngrx/entity": "~13.0.2",
108
- "@ngrx/router-store": "~13.0.2",
109
- "@ngrx/schematics": "~13.0.2",
110
- "@ngrx/store": "~13.0.2",
111
- "@ngrx/store-devtools": "~13.0.2",
112
- "@ngx-formly/core": "6.0.0-next.8",
113
- "@ngx-formly/material": "6.0.0-next.8",
114
- "@ngx-translate/core": "14.0.0",
115
- "@ngx-translate/http-loader": "7.0.0",
101
+ "@ngneat/hot-toast": "5.0.1",
102
+ "@ngneat/overview": "5.0.0",
103
+ "@ngneat/spectator": "15.0.0",
104
+ "@ngrx/component-store": "~16.0.1",
105
+ "@ngrx/data": "~16.0.1",
106
+ "@ngrx/effects": "~16.0.1",
107
+ "@ngrx/entity": "~16.0.1",
108
+ "@ngrx/router-store": "~16.0.1",
109
+ "@ngrx/schematics": "~16.0.1",
110
+ "@ngrx/store": "~16.0.1",
111
+ "@ngrx/store-devtools": "~16.0.1",
112
+ "@ngx-formly/core": "6.1.7",
113
+ "@ngx-formly/material": "6.1.7",
114
+ "@ngx-translate/core": "15.0.0",
115
+ "@ngx-translate/http-loader": "8.0.0",
116
+ "@testdeck/jasmine": "0.3.3",
117
+ "@testdeck/jest": "0.3.3",
118
+ "@testdeck/mocha": "0.3.3",
116
119
  "@types/chai": "4.1.2",
117
120
  "@types/chokidar": "2.1.3",
118
121
  "@types/dateformat": "1.0.1",
@@ -124,7 +127,7 @@
124
127
  "@types/http-proxy": "1.16.0",
125
128
  "@types/http-proxy-middleware": "0.19.2",
126
129
  "@types/inquirer": "7.3.1",
127
- "@types/jasmine": "3.10.0",
130
+ "@types/jasmine": "4.3.0",
128
131
  "@types/json-stringify-safe": "5.0.0",
129
132
  "@types/json5": "0.0.29",
130
133
  "@types/lockfile": "1.0.0",
@@ -143,10 +146,10 @@
143
146
  "@types/vinyl": "2.0.2",
144
147
  "@types/watch": "1.0.0",
145
148
  "accepts": "1.3.4",
146
- "angular-material-css-vars": "5.0.0",
147
- "any-project-cli": "~13.1.26",
149
+ "angular-material-css-vars": "5.0.2",
150
+ "any-project-cli": "~13.1.28",
148
151
  "axios": "1.3.5",
149
- "background-worker-process": "~13.1.43",
152
+ "background-worker-process": "~13.1.45",
150
153
  "base32": "0.0.7",
151
154
  "bcryptjs": "2.4.3",
152
155
  "better-sqlite3": "7.6.2",
@@ -167,7 +170,7 @@
167
170
  "concurrently": "3.5.1",
168
171
  "content-type": "1.0.4",
169
172
  "cookie-parser": "1.4.3",
170
- "copy-paste": "1.3.0",
173
+ "copy-paste": "1.5.3",
171
174
  "cors": "2.8.4",
172
175
  "cpr": "3.0.1",
173
176
  "cross-spawn": "7.0.3",
@@ -187,13 +190,13 @@
187
190
  "express-session": "1.17.3",
188
191
  "file-loader": "1.1.5",
189
192
  "file-saver": "2.0.5",
190
- "firedev": "^13",
191
- "firedev-crud": "~13.1.48",
192
- "firedev-crud-deamon": "~13.1.38",
193
- "firedev-ports": "~13.1.42",
194
- "firedev-storage": "~13.2.35",
195
- "firedev-typeorm": "~13.1.30",
196
- "firedev-ui": "~13.2.7",
193
+ "firedev": "^16",
194
+ "firedev-crud": "~13.1.50",
195
+ "firedev-crud-deamon": "~13.1.40",
196
+ "firedev-ports": "~13.1.45",
197
+ "firedev-storage": "~13.2.37",
198
+ "firedev-typeorm": "~13.1.32",
199
+ "firedev-ui": "~16.0.1",
197
200
  "fkill": "6.1.0",
198
201
  "font-awesome": "4.7.0",
199
202
  "form-data": "4.0.0",
@@ -207,51 +210,51 @@
207
210
  "http-proxy-middleware": "0.19.1",
208
211
  "http-server": "0.11.1",
209
212
  "immutable": "4.3.0",
210
- "incremental-compiler": "~13.1.25",
213
+ "incremental-compiler": "~16.0.28",
211
214
  "inquirer": "7.3.3",
212
215
  "inquirer-autocomplete-prompt": "1.3.0",
213
216
  "is-elevated": "3.0.0",
214
- "isomorphic-region-loader": "~13.1.36",
217
+ "isomorphic-region-loader": "~13.1.38",
215
218
  "istanbul-instrumenter-loader": "2.0.0",
216
- "jasmine-core": "4.0.0",
219
+ "jasmine-core": "4.6.0",
217
220
  "jscodeshift": "0.6.3",
218
221
  "json-stringify-safe": "5.0.1",
219
- "json10": "~13.1.43",
220
- "json10-writer": "~13.1.39",
221
- "json5": "2.1.3",
222
+ "json10": "~13.1.45",
223
+ "json10-writer": "~13.1.41",
224
+ "json5": "2.2.1",
222
225
  "json5-writer": "0.2.0",
223
226
  "jszip": "3.10.1",
224
- "karma": "6.3.0",
225
- "karma-chrome-launcher": "3.1.0",
227
+ "karma": "6.4.0",
228
+ "karma-chrome-launcher": "3.2.0",
226
229
  "karma-cli": "1.0.1",
227
- "karma-coverage": "2.1.0",
228
- "karma-jasmine": "4.0.0",
229
- "karma-jasmine-html-reporter": "1.7.0",
230
+ "karma-coverage": "2.2.0",
231
+ "karma-jasmine": "5.1.0",
232
+ "karma-jasmine-html-reporter": "2.0.0",
230
233
  "lnk": "1.0.1",
231
234
  "localforage": "1.10.0",
232
235
  "lockfile": "1.0.4",
233
- "lodash": "4.17.4",
236
+ "lodash": "4.17.20",
234
237
  "lowdb": "1.0.0",
235
- "magic-renamer": "~13.1.40",
238
+ "magic-renamer": "~13.1.42",
236
239
  "material-design-icons": "3.0.1",
237
240
  "method-override": "2.3.10",
238
241
  "minimist": "1.2.0",
239
242
  "mkdirp": "0.5.1",
240
243
  "mocha": "5.2.0",
241
- "moment": "2.22.2",
242
- "morphi": "~13.2.10",
243
- "ng-in-viewport": "13.0.1",
244
- "ng-packagr": "13.0.0",
244
+ "moment": "2.29.3",
245
+ "morphi": "~16.0.2",
246
+ "ng-in-viewport": "15.0.2",
247
+ "ng-packagr": "16.0.1",
245
248
  "ng-talkback": "~13.1.19",
246
- "ng2-logger": "~13.1.24",
247
- "ng2-rest": "~13.2.7",
248
- "ngx-ace-wrapper": "12",
249
- "ngx-editor": "12.2.1",
250
- "ngx-highlightjs": "6.1.3",
249
+ "ng2-logger": "~16.0.2",
250
+ "ng2-rest": "~13.2.9",
251
+ "ngx-ace-wrapper": "14.0.0",
252
+ "ngx-editor": "15.3.0",
253
+ "ngx-highlightjs": "9.0.0",
251
254
  "ngx-moment": "6.0.2",
252
255
  "ngx-pipes": "3.0.0",
253
- "ngx-progressbar": "8.0.0",
254
- "ngx-scrollbar": "9.0.2",
256
+ "ngx-progressbar": "11.0.0",
257
+ "ngx-scrollbar": "12.0.0",
255
258
  "ngx-store": "3.1.1",
256
259
  "ngx-typed-js": "2.1.1",
257
260
  "node-cli-tester": "~13.1.19",
@@ -278,32 +281,33 @@
278
281
  "record-replay-req-res-scenario": "~13.1.20",
279
282
  "reflect-metadata": "0.1.10",
280
283
  "rimraf": "2.6.2",
281
- "rxjs": "~7.5.0",
284
+ "rxjs": "~7.8.0",
282
285
  "semver": "6.3.0",
283
286
  "simple-git": "1.96.0",
284
287
  "sloc": "0.2.0",
285
288
  "socket.io": "2.4.1",
286
289
  "sort-package-json": "1.11.0",
287
290
  "sql.js": "1.8.0",
288
- "static-columns": "~13.3.6",
291
+ "static-columns": "~16.0.1",
289
292
  "string-similarity": "4.0.2",
290
293
  "sudo-block": "3.0.0",
291
294
  "systeminformation": "3.45.7",
292
295
  "task.js": "0.1.5",
293
296
  "threads": "1.7.0",
294
- "tnp-cli": "~13.1.59",
295
- "tnp-config": "~13.1.75",
296
- "tnp-core": "~13.2.19",
297
- "tnp-db": "~13.1.20",
298
- "tnp-helpers": "~13.1.37",
299
- "tnp-models": "~13.1.26",
297
+ "tnp-cli": "~16.0.3",
298
+ "tnp-config": "~16.0.3",
299
+ "tnp-core": "~16.0.6",
300
+ "tnp-db": "~13.1.22",
301
+ "tnp-helpers": "~13.1.39",
302
+ "tnp-models": "~13.1.28",
300
303
  "ts-debug": "1.3.0",
301
304
  "ts-loader": "2.3.1",
302
- "ts-node": "10.7.0",
305
+ "ts-node": "10.9.1",
303
306
  "tslib": "~2.3.0",
307
+ "turndown": "7.1.2",
304
308
  "typeorm": "~0.3.10",
305
- "typescript": "~4.6.2",
306
- "typescript-class-helpers": "~13.2.12",
309
+ "typescript": "~5.0.2",
310
+ "typescript-class-helpers": "~16.0.14",
307
311
  "typescript-formatter": "~7.2.2",
308
312
  "underscore": "1.9.1",
309
313
  "uuid": "8.3.2",
@@ -312,13 +316,13 @@
312
316
  "vpn-split": "~13.1.23",
313
317
  "watch": "1.0.2",
314
318
  "yup": "1.1.1",
315
- "zone.js": "~0.11.4"
319
+ "zone.js": "~0.13.0"
316
320
  }
317
321
  },
318
322
  "build": {
319
- "number": 250,
320
- "date": "2023-06-01T12:46:26.000Z",
321
- "hash": "9813456456aa743d2e5a7753f97743549c430375",
323
+ "number": 255,
324
+ "date": "2023-06-08T21:23:49.000Z",
325
+ "hash": "4fef33b14eb6ddda61ead27af102b5aea9061b5f",
322
326
  "options": {}
323
327
  },
324
328
  "currentProjectName": "json10",
@@ -326,7 +330,7 @@
326
330
  "currentProjectLaunchConfiguration": "{\"version\":\"0.2.0\",\"configurations\":[{\"type\":\"node\",\"request\":\"launch\",\"name\":\"Launch Server standalone\",\"program\":\"${workspaceFolder}/run.js\",\"args\":[\"--ENVoverride=%7B%0A%20%20%20%20%22clientProjectName%22%3A%20%22json10%22%0A%7D\"],\"runtimeArgs\":[\"--nolazy\",\"-r\",\"ts-node/register\",\"--experimental-worker\"]},{\"name\":\"Debugger with ng serve\",\"type\":\"chrome\",\"request\":\"launch\",\"preLaunchTask\":\"Ng Serve\",\"postDebugTask\":\"terminateall\",\"sourceMaps\":true,\"webRoot\":\"${workspaceFolder}\",\"sourceMapPathOverrides\":{\"webpack:/*\":\"${webRoot}/*\",\"/./*\":\"${webRoot}/*\",\"/tmp-src/*\":\"${webRoot}/*\",\"/*\":\"*\",\"/./~/*\":\"${webRoot}/node_modules/*\"}},{\"type\":\"node\",\"request\":\"attach\",\"name\":\"Attach to global cli tool\",\"port\":9229,\"skipFiles\":[\"<node_internals>/**\"]}],\"compounds\":[{\"name\":\"Debug backend/frontend\",\"configurations\":[\"Launch Server standalone\",\"Debugger with ng serve\"]}]}",
327
331
  "currentProjectTasksConfiguration": "{\"version\":\"2.0.0\",\"tasks\":[{\"label\":\"terminateall\",\"command\":\"echo ${input:terminate}\",\"type\":\"shell\",\"problemMatcher\":[]},{\"label\":\"Ng Serve\",\"type\":\"shell\",\"command\":\"tnp build\",\"isBackground\":true,\"presentation\":{\"reveal\":\"always\"},\"group\":{\"kind\":\"build\",\"isDefault\":true},\"problemMatcher\":{\"owner\":\"typescript\",\"source\":\"ts\",\"applyTo\":\"closedDocuments\",\"fileLocation\":[\"relative\",\"${cwd}\"],\"pattern\":\"$tsc\",\"background\":{\"activeOnStart\":true,\"beginsPattern\":{\"regexp\":\"(.*?)\"},\"endsPattern\":{\"regexp\":\"Compiled |Failed to compile.\"}}}}],\"inputs\":[{\"id\":\"terminate\",\"type\":\"command\",\"command\":\"workbench.action.tasks.terminate\",\"args\":\"terminateAll\"}]}",
328
332
  "currentProjectType": "isomorphic-lib",
329
- "currentFrameworkVersion": "13.1.198",
333
+ "currentFrameworkVersion": "16.0.0",
330
334
  "currentProjectIsStrictSite": false,
331
335
  "currentProjectIsDependencySite": false,
332
336
  "currentProjectIsStatic": false,
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbjEwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vdG1wLWxpYnMtZm9yLWJ1bmRsZS13ZWJzcWwvanNvbjEwL3Byb2plY3RzL2pzb24xMC9zcmMvanNvbjEwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=
@@ -1,54 +1,54 @@
1
- import { _ } from 'tnp-core/websql';
2
- import { walk } from 'lodash-walk-object/websql';
3
- import { CLASS } from 'typescript-class-helpers/websql';
4
- export class JSON10 {
5
- static structureArray(anyJSON, options) {
6
- let pathes = [];
7
- const { include, exclude } = options || {};
8
- walk.Object(anyJSON, (value, lodashPath) => {
9
- if (!_.isUndefined(value)) {
10
- pathes.push(lodashPath);
11
- }
12
- }, { include, exclude, checkCircural: true });
13
- return pathes;
14
- }
15
- static cleaned(json, onCircs, options) {
16
- const result = _.isArray(json) ? [] : {};
17
- const classFN = CLASS.OBJECT(json).isClassObject && CLASS.getFromObject(json);
18
- const { exclude, include, breadthWalk } = options || { exclude: [], include: [], breadthWalk: false };
19
- const { circs } = walk.Object(json, (value, lodashPath, changeValueTo, options) => {
20
- if (_.isObject(value) && options.isCircural) {
21
- _.set(result, lodashPath, null);
22
- }
23
- else {
24
- _.set(result, lodashPath, _.cloneDeep(value));
25
- }
26
- }, { include, exclude, breadthWalk, checkCircural: true });
27
- if (_.isFunction(onCircs)) {
28
- onCircs(circs);
29
- }
30
- return _.isFunction(classFN) ? _.merge(new classFN(), result) : result;
31
- }
32
- static stringify(anyJSON, replace, spaces, onCircs) {
33
- const json = this.cleaned(anyJSON, onCircs);
34
- return JSON.stringify(json, replace, spaces);
35
- }
36
- static parse(json, circs = []) {
37
- let res = JSON.parse(json);
38
- if (_.isArray(circs)) {
39
- circs.forEach(({ circuralTargetPath, pathToObj }) => {
40
- if (circuralTargetPath === '') {
41
- _.set(res, pathToObj, res);
42
- }
43
- else {
44
- let v = _.get(res, circuralTargetPath);
45
- _.set(res, pathToObj, v);
46
- }
47
- });
48
- }
49
- return res;
50
- }
51
- }
52
- ;
53
- ({}); // @--end-of-file-for-module=json10 lib/index.ts
1
+ import { _ } from 'tnp-core/websql';
2
+ import { walk } from 'lodash-walk-object/websql';
3
+ import { CLASS } from 'typescript-class-helpers/websql';
4
+ export class JSON10 {
5
+ static structureArray(anyJSON, options) {
6
+ let pathes = [];
7
+ const { include, exclude } = options || {};
8
+ walk.Object(anyJSON, (value, lodashPath) => {
9
+ if (!_.isUndefined(value)) {
10
+ pathes.push(lodashPath);
11
+ }
12
+ }, { include, exclude, checkCircural: true });
13
+ return pathes;
14
+ }
15
+ static cleaned(json, onCircs, options) {
16
+ const result = _.isArray(json) ? [] : {};
17
+ const classFN = CLASS.OBJECT(json).isClassObject && CLASS.getFromObject(json);
18
+ const { exclude, include, breadthWalk } = options || { exclude: [], include: [], breadthWalk: false };
19
+ const { circs } = walk.Object(json, (value, lodashPath, changeValueTo, options) => {
20
+ if (_.isObject(value) && options.isCircural) {
21
+ _.set(result, lodashPath, null);
22
+ }
23
+ else {
24
+ _.set(result, lodashPath, _.cloneDeep(value));
25
+ }
26
+ }, { include, exclude, breadthWalk, checkCircural: true });
27
+ if (_.isFunction(onCircs)) {
28
+ onCircs(circs);
29
+ }
30
+ return _.isFunction(classFN) ? _.merge(new classFN(), result) : result;
31
+ }
32
+ static stringify(anyJSON, replace, spaces, onCircs) {
33
+ const json = this.cleaned(anyJSON, onCircs);
34
+ return JSON.stringify(json, replace, spaces);
35
+ }
36
+ static parse(json, circs = []) {
37
+ let res = JSON.parse(json);
38
+ if (_.isArray(circs)) {
39
+ circs.forEach(({ circuralTargetPath, pathToObj }) => {
40
+ if (circuralTargetPath === '') {
41
+ _.set(res, pathToObj, res);
42
+ }
43
+ else {
44
+ let v = _.get(res, circuralTargetPath);
45
+ _.set(res, pathToObj, v);
46
+ }
47
+ });
48
+ }
49
+ return res;
50
+ }
51
+ }
52
+ ;
53
+ ({}); // @--end-of-file-for-module=json10 lib/index.ts
54
54
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90bXAtbGlicy1mb3ItYnVuZGxlLXdlYnNxbC9qc29uMTAvcHJvamVjdHMvanNvbjEwL3NyYy9saWIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLENBQUMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3BDLE9BQU8sRUFBRSxJQUFJLEVBQVUsTUFBTSwyQkFBMkIsQ0FBQztBQUV6RCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFNeEQsTUFBTSxPQUFPLE1BQU07SUFFVixNQUFNLENBQUMsY0FBYyxDQUFDLE9BQWUsRU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hdGljIHBhcnNlKGpzb246IHN0cmluZywgY2lyY3M6IENpcmNbXSA9IFtdKSB7XG4gICAgbGV0IHJlcyA9IEpTT04ucGFyc2UoanNvbik7XG4gICAgaWYgKF8uaXNBcnJheShjaXJjcykpIHtcbiAgICAgIGNpcmNzLmZvckVhY2goKHsgY2lyY3VyYWxUYXJnZXRQYXRoLCBwYXRoVG9PYmogfSkgPT4ge1xuXG4gICAgICAgIGlmIChjaXJjdXJhbFRhcmdldFBhdGggPT09ICcnKSB7XG4gICAgICAgICAgXy5zZXQocmVzLCBwYXRoVG9PYmosIHJlcylcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBsZXQgdiA9IF8uZ2V0KHJlcywgY2lyY3VyYWxUYXJnZXRQYXRoKTtcbiAgICAgICAgICBfLnNldChyZXMsIHBhdGhUb09iaiwgdilcbiAgICAgICAgfVxuXG4gICAgICB9KVxuICAgIH1cbiAgICByZXR1cm4gcmVzO1xuICB9XG59XG5cbiA7KHt9KTsgLy8gQC0tZW5kLW9mLWZpbGUtZm9yLW1vZHVsZT1qc29uMTAgbGliL2luZGV4LnRzIl19
@@ -1,2 +1,2 @@
1
- export * from './lib';
1
+ export * from './lib';
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RtcC1saWJzLWZvci1idW5kbGUtd2Vic3FsL2pzb24xMC9wcm9qZWN0cy9qc29uMTAvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxPQUFPLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYic7XG4iXX0=
@@ -2,59 +2,59 @@ import { _ } from 'tnp-core/websql';
2
2
  import { walk } from 'lodash-walk-object/websql';
3
3
  import { CLASS } from 'typescript-class-helpers/websql';
4
4
 
5
- class JSON10 {
6
- static structureArray(anyJSON, options) {
7
- let pathes = [];
8
- const { include, exclude } = options || {};
9
- walk.Object(anyJSON, (value, lodashPath) => {
10
- if (!_.isUndefined(value)) {
11
- pathes.push(lodashPath);
12
- }
13
- }, { include, exclude, checkCircural: true });
14
- return pathes;
15
- }
16
- static cleaned(json, onCircs, options) {
17
- const result = _.isArray(json) ? [] : {};
18
- const classFN = CLASS.OBJECT(json).isClassObject && CLASS.getFromObject(json);
19
- const { exclude, include, breadthWalk } = options || { exclude: [], include: [], breadthWalk: false };
20
- const { circs } = walk.Object(json, (value, lodashPath, changeValueTo, options) => {
21
- if (_.isObject(value) && options.isCircural) {
22
- _.set(result, lodashPath, null);
23
- }
24
- else {
25
- _.set(result, lodashPath, _.cloneDeep(value));
26
- }
27
- }, { include, exclude, breadthWalk, checkCircural: true });
28
- if (_.isFunction(onCircs)) {
29
- onCircs(circs);
30
- }
31
- return _.isFunction(classFN) ? _.merge(new classFN(), result) : result;
32
- }
33
- static stringify(anyJSON, replace, spaces, onCircs) {
34
- const json = this.cleaned(anyJSON, onCircs);
35
- return JSON.stringify(json, replace, spaces);
36
- }
37
- static parse(json, circs = []) {
38
- let res = JSON.parse(json);
39
- if (_.isArray(circs)) {
40
- circs.forEach(({ circuralTargetPath, pathToObj }) => {
41
- if (circuralTargetPath === '') {
42
- _.set(res, pathToObj, res);
43
- }
44
- else {
45
- let v = _.get(res, circuralTargetPath);
46
- _.set(res, pathToObj, v);
47
- }
48
- });
49
- }
50
- return res;
51
- }
52
- }
53
- ;
5
+ class JSON10 {
6
+ static structureArray(anyJSON, options) {
7
+ let pathes = [];
8
+ const { include, exclude } = options || {};
9
+ walk.Object(anyJSON, (value, lodashPath) => {
10
+ if (!_.isUndefined(value)) {
11
+ pathes.push(lodashPath);
12
+ }
13
+ }, { include, exclude, checkCircural: true });
14
+ return pathes;
15
+ }
16
+ static cleaned(json, onCircs, options) {
17
+ const result = _.isArray(json) ? [] : {};
18
+ const classFN = CLASS.OBJECT(json).isClassObject && CLASS.getFromObject(json);
19
+ const { exclude, include, breadthWalk } = options || { exclude: [], include: [], breadthWalk: false };
20
+ const { circs } = walk.Object(json, (value, lodashPath, changeValueTo, options) => {
21
+ if (_.isObject(value) && options.isCircural) {
22
+ _.set(result, lodashPath, null);
23
+ }
24
+ else {
25
+ _.set(result, lodashPath, _.cloneDeep(value));
26
+ }
27
+ }, { include, exclude, breadthWalk, checkCircural: true });
28
+ if (_.isFunction(onCircs)) {
29
+ onCircs(circs);
30
+ }
31
+ return _.isFunction(classFN) ? _.merge(new classFN(), result) : result;
32
+ }
33
+ static stringify(anyJSON, replace, spaces, onCircs) {
34
+ const json = this.cleaned(anyJSON, onCircs);
35
+ return JSON.stringify(json, replace, spaces);
36
+ }
37
+ static parse(json, circs = []) {
38
+ let res = JSON.parse(json);
39
+ if (_.isArray(circs)) {
40
+ circs.forEach(({ circuralTargetPath, pathToObj }) => {
41
+ if (circuralTargetPath === '') {
42
+ _.set(res, pathToObj, res);
43
+ }
44
+ else {
45
+ let v = _.get(res, circuralTargetPath);
46
+ _.set(res, pathToObj, v);
47
+ }
48
+ });
49
+ }
50
+ return res;
51
+ }
52
+ }
53
+ ;
54
54
  ({}); // @--end-of-file-for-module=json10 lib/index.ts
55
55
 
56
- /**
57
- * Generated bundle index. Do not edit.
56
+ /**
57
+ * Generated bundle index. Do not edit.
58
58
  */
59
59
 
60
60
  export { JSON10 };
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
- /**
3
- * Generated bundle index. Do not edit.
4
- */
5
- /// <amd-module name="json10" />
2
+ /**
3
+ * Generated bundle index. Do not edit.
4
+ */
5
+ /// <amd-module name="json10" />
6
6
  export * from './public-api';
@@ -1,16 +1,16 @@
1
1
  // @ts-nocheck
2
- import { Models } from 'lodash-walk-object/websql';
3
- export declare type Circ = Models.Circ;
4
- export declare class JSON10 {
5
- static structureArray(anyJSON: Object, options?: {
6
- include?: string[];
7
- exclude?: string[];
8
- }): any[];
9
- static cleaned(json: any, onCircs?: (circs: Circ[]) => any, options?: {
10
- exclude?: string[];
11
- include?: string[];
12
- breadthWalk?: boolean;
13
- }): any;
14
- static stringify(anyJSON: Object, replace?: any, spaces?: number, onCircs?: (circs: Circ[]) => any): string;
15
- static parse(json: string, circs?: Circ[]): any;
2
+ import { Models } from 'lodash-walk-object/websql';
3
+ export type Circ = Models.Circ;
4
+ export declare class JSON10 {
5
+ static structureArray(anyJSON: Object, options?: {
6
+ include?: string[];
7
+ exclude?: string[];
8
+ }): any[];
9
+ static cleaned(json: any, onCircs?: (circs: Circ[]) => any, options?: {
10
+ exclude?: string[];
11
+ include?: string[];
12
+ breadthWalk?: boolean;
13
+ }): any;
14
+ static stringify(anyJSON: Object, replace?: any, spaces?: number, onCircs?: (circs: Circ[]) => any): string;
15
+ static parse(json: string, circs?: Circ[]): any;
16
16
  }
@@ -8,23 +8,17 @@
8
8
  "dependencies": {
9
9
  "tslib": "^2.3.0"
10
10
  },
11
- "module": "fesm2015/json10.mjs",
12
- "es2020": "fesm2020/json10.mjs",
13
- "esm2020": "esm2020/json10.mjs",
14
- "fesm2020": "fesm2020/json10.mjs",
15
- "fesm2015": "fesm2015/json10.mjs",
16
- "typings": "json10.d.ts",
11
+ "module": "fesm2022/json10.mjs",
12
+ "typings": "index.d.ts",
17
13
  "exports": {
18
14
  "./package.json": {
19
15
  "default": "./package.json"
20
16
  },
21
17
  ".": {
22
- "types": "./json10.d.ts",
23
- "esm2020": "./esm2020/json10.mjs",
24
- "es2020": "./fesm2020/json10.mjs",
25
- "es2015": "./fesm2015/json10.mjs",
26
- "node": "./fesm2015/json10.mjs",
27
- "default": "./fesm2020/json10.mjs"
18
+ "types": "./index.d.ts",
19
+ "esm2022": "./esm2022/json10.mjs",
20
+ "esm": "./esm2022/json10.mjs",
21
+ "default": "./fesm2022/json10.mjs"
28
22
  }
29
23
  },
30
24
  "sideEffects": false