@karmaniverous/jsonmap 2.0.1 → 2.0.3
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/dist/index.cjs +17914 -91
- package/dist/index.mjs +17912 -89
- package/package.json +27 -19
- package/dist/index.iife.js +0 -204
- package/dist/index.iife.min.js +0 -1
package/package.json
CHANGED
|
@@ -6,21 +6,24 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"lodash": "^4.17.21",
|
|
8
8
|
"nanoid": "^5.0.7",
|
|
9
|
-
"tslog": "^4.9.
|
|
9
|
+
"tslog": "^4.9.3",
|
|
10
10
|
"zod": "^3.23.8"
|
|
11
11
|
},
|
|
12
12
|
"description": "A hyper-generic JSON mapping library.",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@eslint/js": "^9.
|
|
14
|
+
"@eslint/js": "^9.6.0",
|
|
15
|
+
"@rollup/plugin-alias": "^5.1.0",
|
|
16
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
17
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
18
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
15
19
|
"@rollup/plugin-terser": "^0.4.4",
|
|
16
20
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
17
21
|
"@types/chai": "^4.3.16",
|
|
18
|
-
"@types/debug": "^4.1.12",
|
|
19
22
|
"@types/eslint__js": "^8.42.3",
|
|
20
23
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
21
24
|
"@types/eslint-plugin-mocha": "^10.4.0",
|
|
22
|
-
"@types/lodash": "^4.17.
|
|
23
|
-
"@types/mocha": "^10.0.
|
|
25
|
+
"@types/lodash": "^4.17.6",
|
|
26
|
+
"@types/mocha": "^10.0.7",
|
|
24
27
|
"@types/numeral": "^2.0.5",
|
|
25
28
|
"auto-changelog": "^2.4.0",
|
|
26
29
|
"chai": "^5.1.1",
|
|
@@ -28,22 +31,25 @@
|
|
|
28
31
|
"eslint": "^8.57.0",
|
|
29
32
|
"eslint-config-prettier": "^9.1.0",
|
|
30
33
|
"eslint-plugin-mocha": "^10.4.3",
|
|
31
|
-
"eslint-plugin-simple-import-sort": "^12.1.
|
|
34
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
35
|
+
"eslint-plugin-tsdoc": "^0.2.17",
|
|
36
|
+
"fs-extra": "^11.2.0",
|
|
32
37
|
"jsdom-global": "^3.0.2",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
38
|
+
"knip": "^5.23.3",
|
|
39
|
+
"lefthook": "^1.6.18",
|
|
40
|
+
"mocha": "^10.6.0",
|
|
35
41
|
"numeral": "^2.0.6",
|
|
36
|
-
"nyc": "^
|
|
37
|
-
"prettier": "^3.2
|
|
38
|
-
"release-it": "^17.
|
|
42
|
+
"nyc": "^17.0.0",
|
|
43
|
+
"prettier": "^3.3.2",
|
|
44
|
+
"release-it": "^17.4.1",
|
|
39
45
|
"rimraf": "^5.0.7",
|
|
40
46
|
"rollup": "^4.18.0",
|
|
41
47
|
"rollup-plugin-dts": "^6.1.1",
|
|
42
48
|
"source-map-support": "^0.5.21",
|
|
43
49
|
"ts-node": "^10.9.2",
|
|
44
|
-
"tslib": "^2.6.
|
|
45
|
-
"typescript": "^5.
|
|
46
|
-
"typescript-eslint": "^7.
|
|
50
|
+
"tslib": "^2.6.3",
|
|
51
|
+
"typescript": "^5.5.3",
|
|
52
|
+
"typescript-eslint": "^7.15.0"
|
|
47
53
|
},
|
|
48
54
|
"exports": {
|
|
49
55
|
".": {
|
|
@@ -76,8 +82,8 @@
|
|
|
76
82
|
"release-it": {
|
|
77
83
|
"git": {
|
|
78
84
|
"changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
85
|
+
"commitMessage": "chore: release v${version}",
|
|
86
|
+
"requireBranch": "main"
|
|
81
87
|
},
|
|
82
88
|
"github": {
|
|
83
89
|
"release": true
|
|
@@ -91,7 +97,7 @@
|
|
|
91
97
|
"after:release": [
|
|
92
98
|
"git switch -c release/${version}",
|
|
93
99
|
"git push -u origin release/${version}",
|
|
94
|
-
"git switch
|
|
100
|
+
"git switch ${branchName}"
|
|
95
101
|
]
|
|
96
102
|
},
|
|
97
103
|
"npm": {
|
|
@@ -104,12 +110,14 @@
|
|
|
104
110
|
},
|
|
105
111
|
"scripts": {
|
|
106
112
|
"build": "rimraf dist && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
113
|
+
"knip": "knip",
|
|
107
114
|
"lint": "eslint src/** && prettier -c src",
|
|
108
115
|
"lint:fix": "eslint --fix src/** && prettier --write src",
|
|
109
116
|
"release": "release-it",
|
|
110
|
-
"
|
|
117
|
+
"release:pre": "release-it --no-git.requireBranch --github.prerelease --preRelease",
|
|
118
|
+
"test": "cross-env LOG_LEVEL=debug nyc mocha"
|
|
111
119
|
},
|
|
112
120
|
"type": "module",
|
|
113
121
|
"types": "dist/index.d.ts",
|
|
114
|
-
"version": "2.0.
|
|
122
|
+
"version": "2.0.3"
|
|
115
123
|
}
|
package/dist/index.iife.js
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
(function (exports, _, nanoid, tslog) {
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
/******************************************************************************
|
|
5
|
-
Copyright (c) Microsoft Corporation.
|
|
6
|
-
|
|
7
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
-
purpose with or without fee is hereby granted.
|
|
9
|
-
|
|
10
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
12
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
14
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
-
***************************************************************************** */
|
|
18
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
32
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
33
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
34
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
38
|
-
var e = new Error(message);
|
|
39
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Get package scope & name from package.json.
|
|
43
|
-
var _a$1, _b$1, _c;
|
|
44
|
-
const npmPackageRegex = /^(?:(?<packageScope>@[a-z0-9-~][a-z0-9-._~]*)\/)?(?<packageName>[a-z0-9-~][a-z0-9-._~]*)$/;
|
|
45
|
-
const { packageScope, packageName } = ((_c = (_b$1 = (_a$1 = process.env.npm_package_name) === null || _a$1 === void 0 ? void 0 : _a$1.match(npmPackageRegex)) === null || _b$1 === void 0 ? void 0 : _b$1.groups) !== null && _c !== void 0 ? _c : {});
|
|
46
|
-
|
|
47
|
-
var _a, _b;
|
|
48
|
-
// These are the presefined tslog log levels. You can specify
|
|
49
|
-
// LOG_LEVEL by any of the keys or values defined below.
|
|
50
|
-
const logLevels = {
|
|
51
|
-
silly: 0,
|
|
52
|
-
trace: 1,
|
|
53
|
-
debug: 2,
|
|
54
|
-
info: 3,
|
|
55
|
-
warn: 4,
|
|
56
|
-
error: 5,
|
|
57
|
-
fatal: 6,
|
|
58
|
-
};
|
|
59
|
-
const integerLogLevel = parseInt((_a = process.env.LOG_LEVEL) !== null && _a !== void 0 ? _a : '');
|
|
60
|
-
const resolvedLogLevel = Number.isNaN(integerLogLevel)
|
|
61
|
-
? logLevels[((_b = process.env.LOG_LEVEL) !== null && _b !== void 0 ? _b : '').toLowerCase()]
|
|
62
|
-
: integerLogLevel;
|
|
63
|
-
// Set your tslog instance options here! By default, logs are suppressed if LOG_LEVEL is invalid or undefined.
|
|
64
|
-
// See https://tslog.js.org for more info.
|
|
65
|
-
const logger = new tslog.Logger({
|
|
66
|
-
hideLogPositionForProduction: true,
|
|
67
|
-
minLevel: resolvedLogLevel,
|
|
68
|
-
name: packageName,
|
|
69
|
-
type: resolvedLogLevel === undefined ? 'hidden' : 'pretty',
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
var _JsonMap_instances, _JsonMap_transform, _JsonMap_resolvePath;
|
|
73
|
-
// The transformation process leverages JSON.stringify and JSON.parse to eliminate circular references.
|
|
74
|
-
const getJsonFns = () => {
|
|
75
|
-
const seen = new WeakSet();
|
|
76
|
-
const undefinedToken = nanoid.nanoid();
|
|
77
|
-
const replacer = (key, value) => {
|
|
78
|
-
if (typeof value === 'object' && value !== null) {
|
|
79
|
-
if (seen.has(value)) {
|
|
80
|
-
return 'CIRCULAR REFERENCE';
|
|
81
|
-
}
|
|
82
|
-
seen.add(value);
|
|
83
|
-
if (!_.isArrayLikeObject(value))
|
|
84
|
-
return Object.getOwnPropertyNames(value).reduce((v, p) => (Object.assign(Object.assign({}, v), { [p]: value[p] })), {});
|
|
85
|
-
}
|
|
86
|
-
return _.isUndefined(value) ? undefinedToken : value;
|
|
87
|
-
};
|
|
88
|
-
const reviver = (key, value) => value === undefinedToken ? undefined : value;
|
|
89
|
-
return { replacer, reviver };
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* JsonMap class to apply transformations to a JSON object
|
|
93
|
-
*/
|
|
94
|
-
class JsonMap {
|
|
95
|
-
constructor(map = {}, lib = {}, { ignore = /^\$/ } = {}) {
|
|
96
|
-
_JsonMap_instances.add(this);
|
|
97
|
-
this.map = map;
|
|
98
|
-
this.lib = lib;
|
|
99
|
-
this.ignore = _.isString(ignore) ? new RegExp(ignore) : ignore;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Transforms the input data according to the map configuration.
|
|
103
|
-
*/
|
|
104
|
-
transform(input) {
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
// Sets the input data and initializes an empty output object
|
|
107
|
-
this.input = input;
|
|
108
|
-
this.output = {};
|
|
109
|
-
// Perform transformation & eliminate recursion from result.
|
|
110
|
-
const { replacer, reviver } = getJsonFns();
|
|
111
|
-
const result = JSON.parse(JSON.stringify(yield __classPrivateFieldGet(this, _JsonMap_instances, "m", _JsonMap_transform).call(this, this.map, this.input, this.output), replacer), reviver);
|
|
112
|
-
// Recursively eliminate non-string keys & string keys starting with $ and not in ignoreExclusions.
|
|
113
|
-
const deep = (value) => value instanceof Object && !_.isArray(value)
|
|
114
|
-
? _.mapValues(_.pickBy(value, (v, k) => !this.ignore.test(k)), (value) => _.cloneDeepWith(value, deep))
|
|
115
|
-
: undefined;
|
|
116
|
-
return _.cloneDeepWith(result, deep);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
_JsonMap_instances = new WeakSet(), _JsonMap_transform = function _JsonMap_transform(node_1, input_1, output_1) {
|
|
121
|
-
return __awaiter(this, arguments, void 0, function* (node, input, output, path = '') {
|
|
122
|
-
logger.debug('#transform params:\n', { node, input, output, path });
|
|
123
|
-
// Checks if the current node is an object and has only a '$' key
|
|
124
|
-
if (node instanceof Object && _.size(node) === 1 && '$' in node) {
|
|
125
|
-
// Retrieves the transformations to be applied (can be an array or a single object)
|
|
126
|
-
const transformations = _.castArray(node.$);
|
|
127
|
-
logger.debug('transformations:\n', transformations);
|
|
128
|
-
// Array to store the results of the transformations
|
|
129
|
-
const results = [];
|
|
130
|
-
// Iterates over each transformation
|
|
131
|
-
for (const transformation of transformations) {
|
|
132
|
-
logger.debug('processing transformation:\n', transformation);
|
|
133
|
-
// Resolves the object path for the transformation
|
|
134
|
-
const { obj: methodObj, path: methodPath } = __classPrivateFieldGet(this, _JsonMap_instances, "m", _JsonMap_resolvePath).call(this, transformation.method, results);
|
|
135
|
-
// Resolves the parameter paths for the transformation
|
|
136
|
-
const params = _.castArray(transformation.params).map((param) => {
|
|
137
|
-
const { obj: paramObj, path: paramPath } = __classPrivateFieldGet(this, _JsonMap_instances, "m", _JsonMap_resolvePath).call(this, param, results);
|
|
138
|
-
return paramObj
|
|
139
|
-
? paramPath
|
|
140
|
-
? _.get(paramObj, paramPath)
|
|
141
|
-
: paramObj
|
|
142
|
-
: paramPath;
|
|
143
|
-
});
|
|
144
|
-
logger.debug('resolved transformation params:\n', params);
|
|
145
|
-
// Calls the specified method on the resolved object with the resolved parameters
|
|
146
|
-
const result = (yield _.invoke(methodObj, methodPath, ...params));
|
|
147
|
-
logger.debug('transformation result:\n', result);
|
|
148
|
-
// Stores the result of the transformation
|
|
149
|
-
results.unshift(result);
|
|
150
|
-
}
|
|
151
|
-
// Sets the output at the specified path to the last result of the transformations & returns.
|
|
152
|
-
_.set(output, path, results[0]);
|
|
153
|
-
logger.debug('updated output:\n', output);
|
|
154
|
-
return results[0];
|
|
155
|
-
}
|
|
156
|
-
// Checks if the current node is an object
|
|
157
|
-
if (_.isObject(node)) {
|
|
158
|
-
// Creates an empty array or object based on whether the current node is an array or not
|
|
159
|
-
const transformedNode = (Array.isArray(node) ? [] : {});
|
|
160
|
-
// Iterates over each key-value pair in the current node in ascending order by key
|
|
161
|
-
for (const [key, value] of _.sortBy(Object.entries(node), ([key]) => key)) {
|
|
162
|
-
// Constructs the current path by appending the current key to the previous path (if any)
|
|
163
|
-
const currentPath = path ? `${path}.${key}` : key;
|
|
164
|
-
// Recursively calls #transform with the current value, input, output, and path
|
|
165
|
-
// Assigns the transformed value to the corresponding key in the transformedNode
|
|
166
|
-
transformedNode[key] = yield __classPrivateFieldGet(this, _JsonMap_instances, "m", _JsonMap_transform).call(this, value, input, output, currentPath);
|
|
167
|
-
}
|
|
168
|
-
// Sets the output at the specified path to the transformedNode & returnsd.
|
|
169
|
-
_.set(output, path, transformedNode);
|
|
170
|
-
return transformedNode;
|
|
171
|
-
}
|
|
172
|
-
// Sets the output at the specified path to the current node & returns.
|
|
173
|
-
_.set(output, path, node);
|
|
174
|
-
return node;
|
|
175
|
-
});
|
|
176
|
-
}, _JsonMap_resolvePath = function _JsonMap_resolvePath(path, results) {
|
|
177
|
-
// If the path is not a string, return it as is
|
|
178
|
-
if (!_.isString(path)) {
|
|
179
|
-
return { path };
|
|
180
|
-
}
|
|
181
|
-
// Defines special patterns and their corresponding resolution functions
|
|
182
|
-
const patterns = {
|
|
183
|
-
'^\\$\\.(?<obj>lib|input|output)\\.?(?<path>.*)': ({ obj, path }) => ({
|
|
184
|
-
obj: this[obj],
|
|
185
|
-
path,
|
|
186
|
-
}),
|
|
187
|
-
'^\\$(?<path>\\[\\d+\\].*)': ({ path }) => ({
|
|
188
|
-
obj: results,
|
|
189
|
-
path,
|
|
190
|
-
}),
|
|
191
|
-
};
|
|
192
|
-
// Iterates over the special patterns
|
|
193
|
-
for (const [pattern, resolve] of Object.entries(patterns)) {
|
|
194
|
-
const match = path.match(pattern);
|
|
195
|
-
if (match === null || match === void 0 ? void 0 : match.groups)
|
|
196
|
-
return resolve(match.groups);
|
|
197
|
-
}
|
|
198
|
-
// Returns the path as is if it does not match any special patterns
|
|
199
|
-
return { path };
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
exports.JsonMap = JsonMap;
|
|
203
|
-
|
|
204
|
-
})(this.jsonmap = this.jsonmap || {}, _, nanoid, tslog);
|
package/dist/index.iife.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e,n,r){"use strict";function o(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))}function i(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}var s,a,c;"function"==typeof SuppressedError&&SuppressedError;const{packageScope:u,packageName:p}=null!==(c=null===(a=null===(s=process.env.npm_package_name)||void 0===s?void 0:s.match(/^(?:(?<packageScope>@[a-z0-9-~][a-z0-9-._~]*)\/)?(?<packageName>[a-z0-9-~][a-z0-9-._~]*)$/))||void 0===a?void 0:a.groups)&&void 0!==c?c:{};var d,h;const f=parseInt(null!==(d=process.env.LOG_LEVEL)&&void 0!==d?d:""),l=Number.isNaN(f)?{silly:0,trace:1,debug:2,info:3,warn:4,error:5,fatal:6}[(null!==(h=process.env.LOG_LEVEL)&&void 0!==h?h:"").toLowerCase()]:f,m=new r.Logger({hideLogPositionForProduction:!0,minLevel:l,name:p,type:void 0===l?"hidden":"pretty"});var g,v,b;g=new WeakSet,v=function t(n,r,s){return o(this,arguments,void 0,(function*(n,r,o,s=""){if(m.debug("#transform params:\n",{node:n,input:r,output:o,path:s}),n instanceof Object&&1===e.size(n)&&"$"in n){const t=e.castArray(n.$);m.debug("transformations:\n",t);const r=[];for(const n of t){m.debug("processing transformation:\n",n);const{obj:t,path:o}=i(this,g,"m",b).call(this,n.method,r),s=e.castArray(n.params).map((t=>{const{obj:n,path:o}=i(this,g,"m",b).call(this,t,r);return n?o?e.get(n,o):n:o}));m.debug("resolved transformation params:\n",s);const a=yield e.invoke(t,o,...s);m.debug("transformation result:\n",a),r.unshift(a)}return e.set(o,s,r[0]),m.debug("updated output:\n",o),r[0]}if(e.isObject(n)){const a=Array.isArray(n)?[]:{};for(const[c,u]of e.sortBy(Object.entries(n),(([t])=>t))){const e=s?`${s}.${c}`:c;a[c]=yield i(this,g,"m",t).call(this,u,r,o,e)}return e.set(o,s,a),a}return e.set(o,s,n),n}))},b=function(t,n){if(!e.isString(t))return{path:t};const r={"^\\$\\.(?<obj>lib|input|output)\\.?(?<path>.*)":({obj:t,path:e})=>({obj:this[t],path:e}),"^\\$(?<path>\\[\\d+\\].*)":({path:t})=>({obj:n,path:t})};for(const[e,n]of Object.entries(r)){const r=t.match(e);if(null==r?void 0:r.groups)return n(r.groups)}return{path:t}},t.JsonMap=class{constructor(t={},n={},{ignore:r=/^\$/}={}){g.add(this),this.map=t,this.lib=n,this.ignore=e.isString(r)?new RegExp(r):r}transform(t){return o(this,void 0,void 0,(function*(){this.input=t,this.output={};const{replacer:r,reviver:o}=(()=>{const t=new WeakSet,r=n.nanoid();return{replacer:(n,o)=>{if("object"==typeof o&&null!==o){if(t.has(o))return"CIRCULAR REFERENCE";if(t.add(o),!e.isArrayLikeObject(o))return Object.getOwnPropertyNames(o).reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:o[e]})),{})}return e.isUndefined(o)?r:o},reviver:(t,e)=>e===r?void 0:e}})(),s=JSON.parse(JSON.stringify(yield i(this,g,"m",v).call(this,this.map,this.input,this.output),r),o),a=t=>t instanceof Object&&!e.isArray(t)?e.mapValues(e.pickBy(t,((t,e)=>!this.ignore.test(e))),(t=>e.cloneDeepWith(t,a))):void 0;return e.cloneDeepWith(s,a)}))}}}(this.jsonmap=this.jsonmap||{},_,nanoid,tslog);
|