object-flatten-referencing 6.0.4 → 6.0.10

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/CHANGELOG.md CHANGED
@@ -3,26 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## 6.0.3 (2021-11-02)
7
-
8
- ### Bug Fixes
9
-
10
- - bump TS and separate ESLint plugins away from this monorepo ([b1ebce1](https://github.com/codsen/codsen/commit/b1ebce1637d8c41c2d848fc24b0ba4058865bd5d))
11
-
12
- ### Features
13
-
14
- - migrate to ES Modules ([c579dff](https://github.com/codsen/codsen/commit/c579dff3b23205e383035ca10ddcec671e35d0fe))
15
-
16
- ### BREAKING CHANGES
17
-
18
- - programs now are in ES Modules and won't work with Common JS require()
19
-
20
- ## 6.0.1 (2021-09-13)
21
-
22
- ### Bug Fixes
23
-
24
- - bump TS and separate ESLint plugins away from this monorepo ([2e07d42](https://github.com/codsen/codsen/commit/2e07d424222b6ffedf5fb45c83ad453627ec2904))
25
-
26
6
  ## 6.0.0 (2021-09-09)
27
7
 
28
8
  ### Features
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-%YEAR% Roy Revelt and other contributors
3
+ Copyright (c) 2010-2021 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -38,6 +38,7 @@ If you need a legacy version which works with `require`, use version 5.1.0
38
38
 
39
39
  ```js
40
40
  import { strict as assert } from "assert";
41
+
41
42
  import { flattenReferencing } from "object-flatten-referencing";
42
43
 
43
44
  assert.deepEqual(
@@ -60,7 +61,7 @@ assert.deepEqual(
60
61
 
61
62
  ## Documentation
62
63
 
63
- Please [visit codsen.com](https://codsen.com/os/object-flatten-referencing/) for a full description of the API and examples.
64
+ Please [visit codsen.com](https://codsen.com/os/object-flatten-referencing/) for a full description of the API.
64
65
 
65
66
  ## Contributing
66
67
 
@@ -72,4 +73,6 @@ MIT License
72
73
 
73
74
  Copyright (c) 2010-2021 Roy Revelt and other contributors
74
75
 
76
+
75
77
  <img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
78
+
@@ -1,234 +1,10 @@
1
1
  /**
2
2
  * @name object-flatten-referencing
3
3
  * @fileoverview Flatten complex nested objects according to a reference objects
4
- * @version 6.0.4
4
+ * @version 6.0.10
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-flatten-referencing/}
8
8
  */
9
9
 
10
- import clone from 'lodash.clonedeep';
11
- import { strIndexesOfPlus } from 'str-indexes-of-plus';
12
- import { isMatch } from 'matcher';
13
- import isObj from 'lodash.isplainobject';
14
-
15
- const defaults = {
16
- wrapHeadsWith: "%%_",
17
- wrapTailsWith: "_%%",
18
- dontWrapKeys: [],
19
- dontWrapPaths: [],
20
- xhtml: true,
21
- preventDoubleWrapping: true,
22
- preventWrappingIfContains: [],
23
- objectKeyAndValueJoinChar: ".",
24
- wrapGlobalFlipSwitch: true,
25
- ignore: [],
26
- whatToDoWhenReferenceIsMissing: 0,
27
- mergeArraysWithLineBreaks: true,
28
- mergeWithoutTrailingBrIfLineContainsBr: true,
29
- enforceStrictKeyset: true
30
- };
31
- function isStr$1(something) {
32
- return typeof something === "string";
33
- }
34
- function flattenObject(objOrig, originalOpts) {
35
- const opts = { ...defaults,
36
- ...originalOpts
37
- };
38
- if (arguments.length === 0 || Object.keys(objOrig).length === 0) {
39
- return [];
40
- }
41
- const obj = clone(objOrig);
42
- let res = [];
43
- if (isObj(obj)) {
44
- Object.keys(obj).forEach(key => {
45
- if (isObj(obj[key])) {
46
- obj[key] = flattenObject(obj[key], opts);
47
- }
48
- if (Array.isArray(obj[key])) {
49
- res = res.concat(obj[key].map(el => key + opts.objectKeyAndValueJoinChar + el));
50
- }
51
- if (isStr$1(obj[key])) {
52
- res.push(key + opts.objectKeyAndValueJoinChar + obj[key]);
53
- }
54
- });
55
- }
56
- return res;
57
- }
58
- function flattenArr(arrOrig, originalOpts, wrap = false, joinArraysUsingBrs = false) {
59
- const opts = { ...defaults,
60
- ...originalOpts
61
- };
62
- if (arguments.length === 0 || arrOrig.length === 0) {
63
- return "";
64
- }
65
- const arr = clone(arrOrig);
66
- let res = "";
67
- if (arr.length > 0) {
68
- if (joinArraysUsingBrs) {
69
- for (let i = 0, len = arr.length; i < len; i++) {
70
- if (isStr$1(arr[i])) {
71
- let lineBreak;
72
- lineBreak = "";
73
- if (opts.mergeArraysWithLineBreaks && i > 0 && (!opts.mergeWithoutTrailingBrIfLineContainsBr || typeof arr[i - 1] !== "string" || opts.mergeWithoutTrailingBrIfLineContainsBr && arr[i - 1] !== undefined && !arr[i - 1].toLowerCase().includes("<br"))) {
74
- lineBreak = `<br${opts.xhtml ? " /" : ""}>`;
75
- }
76
- res += lineBreak + (wrap ? opts.wrapHeadsWith : "") + arr[i] + (wrap ? opts.wrapTailsWith : "");
77
- } else if (Array.isArray(arr[i])) {
78
- if (arr[i].length > 0 && arr[i].every(isStr$1)) {
79
- let lineBreak = "";
80
- if (opts.mergeArraysWithLineBreaks && res.length > 0) {
81
- lineBreak = `<br${opts.xhtml ? " /" : ""}>`;
82
- }
83
- res = arr[i].reduce((acc, val, i2, arr2) => {
84
- let trailingSpace = "";
85
- if (i2 !== arr2.length - 1) {
86
- trailingSpace = " ";
87
- }
88
- return acc + (i2 === 0 ? lineBreak : "") + (wrap ? opts.wrapHeadsWith : "") + val + (wrap ? opts.wrapTailsWith : "") + trailingSpace;
89
- }, res);
90
- }
91
- }
92
- }
93
- } else {
94
- res = arr.reduce((acc, val, i, arr2) => {
95
- let lineBreak = "";
96
- if (opts.mergeArraysWithLineBreaks && i > 0) {
97
- lineBreak = `<br${opts.xhtml ? " /" : ""}>`;
98
- }
99
- let trailingSpace = "";
100
- if (i !== arr2.length - 1) {
101
- trailingSpace = " ";
102
- }
103
- return acc + (i === 0 ? lineBreak : "") + (wrap ? opts.wrapHeadsWith : "") + val + (wrap ? opts.wrapTailsWith : "") + trailingSpace;
104
- }, res);
105
- }
106
- }
107
- return res;
108
- }
109
- function arrayiffyString(something) {
110
- if (isStr$1(something)) {
111
- if (something.length > 0) {
112
- return [something];
113
- }
114
- return [];
115
- }
116
- return something;
117
- }
118
-
119
- var version$1 = "6.0.4";
120
-
121
- const version = version$1;
122
- function existy(x) {
123
- return x != null;
124
- }
125
- function isStr(something) {
126
- return typeof something === "string";
127
- }
128
- function flattenReferencing(originalInput1, originalReference1, opts1) {
129
- if (arguments.length === 0) {
130
- throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");
131
- }
132
- if (arguments.length === 1) {
133
- throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] reference object missing!");
134
- }
135
- if (existy(opts1) && !isObj(opts1)) {
136
- throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third input, options object must be a plain object. Currently it's: ${typeof opts1}`);
137
- }
138
- const originalOpts = { ...defaults,
139
- ...opts1
140
- };
141
- originalOpts.dontWrapKeys = arrayiffyString(originalOpts.dontWrapKeys);
142
- originalOpts.preventWrappingIfContains = arrayiffyString(originalOpts.preventWrappingIfContains);
143
- originalOpts.dontWrapPaths = arrayiffyString(originalOpts.dontWrapPaths);
144
- originalOpts.ignore = arrayiffyString(originalOpts.ignore);
145
- if (typeof originalOpts.whatToDoWhenReferenceIsMissing !== "number") {
146
- originalOpts.whatToDoWhenReferenceIsMissing = +originalOpts.whatToDoWhenReferenceIsMissing || 0;
147
- }
148
- function ofr(originalInput, originalReference, opts, wrap = true, joinArraysUsingBrs = true, currentRoot = "") {
149
- let input = clone(originalInput);
150
- const reference = clone(originalReference);
151
- if (!opts.wrapGlobalFlipSwitch) {
152
- wrap = false;
153
- }
154
- if (isObj(input)) {
155
- Object.keys(input).forEach(key => {
156
- const currentPath = currentRoot + (currentRoot.length === 0 ? key : `.${key}`);
157
- if (opts.ignore.length === 0 || !opts.ignore.includes(key)) {
158
- if (opts.wrapGlobalFlipSwitch) {
159
- wrap = true;
160
- if (opts.dontWrapKeys.length > 0) {
161
- wrap = wrap && !opts.dontWrapKeys.some(elem => isMatch(key, elem, {
162
- caseSensitive: true
163
- }));
164
- }
165
- if (opts.dontWrapPaths.length > 0) {
166
- wrap = wrap && !opts.dontWrapPaths.some(elem => elem === currentPath);
167
- }
168
- if (opts.preventWrappingIfContains.length > 0 && typeof input[key] === "string") {
169
- wrap = wrap && !opts.preventWrappingIfContains.some(elem => input[key].includes(elem));
170
- }
171
- }
172
- if (existy(reference[key]) || !existy(reference[key]) && opts.whatToDoWhenReferenceIsMissing === 2) {
173
- if (Array.isArray(input[key])) {
174
- if (opts.whatToDoWhenReferenceIsMissing === 2 || isStr(reference[key])) {
175
- input[key] = flattenArr(input[key], opts, wrap, joinArraysUsingBrs);
176
- } else {
177
- if (input[key].every(el => typeof el === "string" || Array.isArray(el))) {
178
- let allOK = true;
179
- input[key].forEach(oneOfElements => {
180
- if (Array.isArray(oneOfElements) && !oneOfElements.every(isStr)) {
181
- allOK = false;
182
- }
183
- });
184
- if (allOK) {
185
- joinArraysUsingBrs = false;
186
- }
187
- }
188
- input[key] = ofr(input[key], reference[key], opts, wrap, joinArraysUsingBrs, currentPath);
189
- }
190
- } else if (isObj(input[key])) {
191
- if (opts.whatToDoWhenReferenceIsMissing === 2 || isStr(reference[key])) {
192
- input[key] = flattenArr(flattenObject(input[key], opts), opts, wrap, joinArraysUsingBrs);
193
- } else if (!wrap) {
194
- input[key] = ofr(input[key], reference[key], { ...opts,
195
- wrapGlobalFlipSwitch: false
196
- }, wrap, joinArraysUsingBrs, currentPath);
197
- } else {
198
- input[key] = ofr(input[key], reference[key], opts, wrap, joinArraysUsingBrs, currentPath);
199
- }
200
- } else if (isStr(input[key])) {
201
- input[key] = ofr(input[key], reference[key], opts, wrap, joinArraysUsingBrs, currentPath);
202
- }
203
- } else if (typeof input[key] !== typeof reference[key]) {
204
- if (opts.whatToDoWhenReferenceIsMissing === 1) {
205
- throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] reference object does not have the key ${key} and we need it. TIP: Turn off throwing via opts.whatToDoWhenReferenceIsMissing.`);
206
- }
207
- }
208
- }
209
- });
210
- } else if (Array.isArray(input)) {
211
- if (Array.isArray(reference)) {
212
- input.forEach((_el, i) => {
213
- if (existy(input[i]) && existy(reference[i])) {
214
- input[i] = ofr(input[i], reference[i], opts, wrap, joinArraysUsingBrs, `${currentRoot}[${i}]`);
215
- } else {
216
- input[i] = ofr(input[i], reference[0], opts, wrap, joinArraysUsingBrs, `${currentRoot}[${i}]`);
217
- }
218
- });
219
- } else if (isStr(reference)) {
220
- input = flattenArr(input, opts, wrap, joinArraysUsingBrs);
221
- }
222
- } else if (isStr(input)) {
223
- if (input.length > 0 && (opts.wrapHeadsWith || opts.wrapTailsWith)) {
224
- if (!opts.preventDoubleWrapping || (opts.wrapHeadsWith === "" || !strIndexesOfPlus(input, opts.wrapHeadsWith.trim()).length) && (opts.wrapTailsWith === "" || !strIndexesOfPlus(input, opts.wrapTailsWith.trim()).length)) {
225
- input = (wrap ? opts.wrapHeadsWith : "") + input + (wrap ? opts.wrapTailsWith : "");
226
- }
227
- }
228
- }
229
- return input;
230
- }
231
- return ofr(originalInput1, originalReference1, originalOpts);
232
- }
233
-
234
- export { arrayiffyString, defaults, flattenArr, flattenObject, flattenReferencing, version };
10
+ import D from"lodash.clonedeep";import{strIndexesOfPlus as A}from"str-indexes-of-plus";import{isMatch as R}from"matcher";import w from"lodash.isplainobject";import O from"lodash.clonedeep";import v from"lodash.isplainobject";var y={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function j(f){return typeof f=="string"}function $(f,b){let h={...y,...b};if(arguments.length===0||Object.keys(f).length===0)return[];let i=O(f),r=[];return v(i)&&Object.keys(i).forEach(a=>{v(i[a])&&(i[a]=$(i[a],h)),Array.isArray(i[a])&&(r=r.concat(i[a].map(p=>`${a}${h.objectKeyAndValueJoinChar}${p}`))),j(i[a])&&r.push(`${a}${h.objectKeyAndValueJoinChar}${i[a]}`)}),r}function T(f,b,h=!1,i=!1){let r={...y,...b};if(arguments.length===0||f.length===0)return"";let a=O(f),p="";if(a.length>0)if(i){for(let e=0,s=a.length;e<s;e++)if(j(a[e])){let l;l="",r.mergeArraysWithLineBreaks&&e>0&&(!r.mergeWithoutTrailingBrIfLineContainsBr||typeof a[e-1]!="string"||r.mergeWithoutTrailingBrIfLineContainsBr&&a[e-1]!==void 0&&!a[e-1].toLowerCase().includes("<br"))&&(l=`<br${r.xhtml?" /":""}>`),p+=`${l}${h?r.wrapHeadsWith:""}${a[e]}${h?r.wrapTailsWith:""}`}else if(Array.isArray(a[e])&&a[e].length>0&&a[e].every(j)){let l="";r.mergeArraysWithLineBreaks&&p.length>0&&(l=`<br${r.xhtml?" /":""}>`),p=a[e].reduce((u,t,o,n)=>{let c="";return o!==n.length-1&&(c=" "),u+(o===0?l:"")+(h?r.wrapHeadsWith:"")+t+(h?r.wrapTailsWith:"")+c},p)}}else p=a.reduce((e,s,l,u)=>{let t="";r.mergeArraysWithLineBreaks&&l>0&&(t=`<br${r.xhtml?" /":""}>`);let o="";return l!==u.length-1&&(o=" "),`${e}${l===0?t:""}${h?r.wrapHeadsWith:""}${s}${h?r.wrapTailsWith:""}${o}`},p);return p}function W(f){return j(f)?f.length>0?[f]:[]:f}var x="6.0.10";var J=x;function m(f){return f!=null}function d(f){return typeof f=="string"}function q(f,b,h){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] reference object missing!");if(m(h)&&!w(h))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third input, options object must be a plain object. Currently it's: ${typeof h}`);let i={...y,...h};i.dontWrapKeys=W(i.dontWrapKeys),i.preventWrappingIfContains=W(i.preventWrappingIfContains),i.dontWrapPaths=W(i.dontWrapPaths),i.ignore=W(i.ignore),typeof i.whatToDoWhenReferenceIsMissing!="number"&&(i.whatToDoWhenReferenceIsMissing=+i.whatToDoWhenReferenceIsMissing||0);function r(a,p,e,s=!0,l=!0,u=""){let t=D(a),o=D(p);return e.wrapGlobalFlipSwitch||(s=!1),w(t)?Object.keys(t).forEach(n=>{let c=u+(u.length===0?n:`.${n}`);if(e.ignore.length===0||!e.ignore.includes(n)){if(e.wrapGlobalFlipSwitch&&(s=!0,e.dontWrapKeys.length>0&&(s=s&&!e.dontWrapKeys.some(g=>R(n,g,{caseSensitive:!0}))),e.dontWrapPaths.length>0&&(s=s&&!e.dontWrapPaths.some(g=>g===c)),e.preventWrappingIfContains.length>0&&typeof t[n]=="string"&&(s=s&&!e.preventWrappingIfContains.some(g=>t[n].includes(g)))),m(o[n])||!m(o[n])&&e.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(t[n]))if(e.whatToDoWhenReferenceIsMissing===2||d(o[n]))t[n]=T(t[n],e,s,l);else{if(t[n].every(g=>typeof g=="string"||Array.isArray(g))){let g=!0;t[n].forEach(I=>{Array.isArray(I)&&!I.every(d)&&(g=!1)}),g&&(l=!1)}t[n]=r(t[n],o[n],e,s,l,c)}else w(t[n])?e.whatToDoWhenReferenceIsMissing===2||d(o[n])?t[n]=T($(t[n],e),e,s,l):s?t[n]=r(t[n],o[n],e,s,l,c):t[n]=r(t[n],o[n],{...e,wrapGlobalFlipSwitch:!1},s,l,c):d(t[n])&&(t[n]=r(t[n],o[n],e,s,l,c));else if(typeof t[n]!=typeof o[n]&&e.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] reference object does not have the key ${n} and we need it. TIP: Turn off throwing via opts.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(t)?Array.isArray(o)?t.forEach((n,c)=>{m(t[c])&&m(o[c])?t[c]=r(t[c],o[c],e,s,l,`${u}[${c}]`):t[c]=r(t[c],o[0],e,s,l,`${u}[${c}]`)}):d(o)&&(t=T(t,e,s,l)):d(t)&&t.length>0&&(e.wrapHeadsWith||e.wrapTailsWith)&&(!e.preventDoubleWrapping||(e.wrapHeadsWith===""||!A(t,e.wrapHeadsWith.trim()).length)&&(e.wrapTailsWith===""||!A(t,e.wrapTailsWith.trim()).length))&&(t=`${s?e.wrapHeadsWith:""}${t}${s?e.wrapTailsWith:""}`),t}return r(f,b,i)}export{W as arrayiffyString,y as defaults,T as flattenArr,$ as flattenObject,q as flattenReferencing,J as version};
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * @name object-flatten-referencing
3
3
  * @fileoverview Flatten complex nested objects according to a reference objects
4
- * @version 6.0.4
4
+ * @version 6.0.10
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-flatten-referencing/}
8
8
  */
9
9
 
10
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).objectFlattenReferencing={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={exports:{}};!function(t,r){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",c="[object Date]",s="[object Function]",u="[object GeneratorFunction]",f="[object Map]",l="[object Number]",p="[object Object]",h="[object Promise]",y="[object RegExp]",g="[object Set]",d="[object String]",b="[object Symbol]",_="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",j="[object Float32Array]",W="[object Float64Array]",m="[object Int8Array]",A="[object Int16Array]",O="[object Int32Array]",T="[object Uint8Array]",x="[object Uint8ClampedArray]",I="[object Uint16Array]",$="[object Uint32Array]",E=/\w*$/,S=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,R={};R[i]=R["[object Array]"]=R[v]=R[w]=R[a]=R[c]=R[j]=R[W]=R[m]=R[A]=R[O]=R[f]=R[l]=R[p]=R[y]=R[g]=R[d]=R[b]=R[T]=R[x]=R[I]=R[$]=!0,R["[object Error]"]=R[s]=R[_]=!1;var C="object"==typeof self&&self&&self.Object===Object&&self,D="object"==typeof e&&e&&e.Object===Object&&e||C||Function("return this")(),k=r&&!r.nodeType&&r,B=k&&t&&!t.nodeType&&t,M=B&&B.exports===k;function F(t,e){return t.set(e[0],e[1]),t}function H(t,e){return t.add(e),t}function L(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function K(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function G(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function U(t,e){return function(r){return t(e(r))}}function V(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var J,N=Array.prototype,z=Function.prototype,q=Object.prototype,Q=D["__core-js_shared__"],X=(J=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Y=z.toString,Z=q.hasOwnProperty,tt=q.toString,et=RegExp("^"+Y.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=M?D.Buffer:void 0,nt=D.Symbol,ot=D.Uint8Array,it=U(Object.getPrototypeOf,Object),at=Object.create,ct=q.propertyIsEnumerable,st=N.splice,ut=Object.getOwnPropertySymbols,ft=rt?rt.isBuffer:void 0,lt=U(Object.keys,Object),pt=Bt(D,"DataView"),ht=Bt(D,"Map"),yt=Bt(D,"Promise"),gt=Bt(D,"Set"),dt=Bt(D,"WeakMap"),bt=Bt(Object,"create"),_t=Kt(pt),vt=Kt(ht),wt=Kt(yt),jt=Kt(gt),Wt=Kt(dt),mt=nt?nt.prototype:void 0,At=mt?mt.valueOf:void 0;function Ot(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Tt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function xt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function It(t){this.__data__=new Tt(t)}function $t(t,e){var r=Ut(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Vt(t)}(t)&&Z.call(t,"callee")&&(!ct.call(t,"callee")||tt.call(t)==i)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var a in t)!e&&!Z.call(t,a)||o&&("length"==a||Ht(a,n))||r.push(a);return r}function Et(t,e,r){var n=t[e];Z.call(t,e)&&Gt(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function St(t,e){for(var r=t.length;r--;)if(Gt(t[r][0],e))return r;return-1}function Pt(t,e,r,n,o,h,_){var S;if(n&&(S=h?n(t,o,h,_):n(t)),void 0!==S)return S;if(!zt(t))return t;var P=Ut(t);if(P){if(S=function(t){var e=t.length,r=t.constructor(e);e&&"string"==typeof t[0]&&Z.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!e)return function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(t,S)}else{var C=Ft(t),D=C==s||C==u;if(Jt(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(C==p||C==i||D&&!h){if(K(t))return h?t:{};if(S=function(t){return"function"!=typeof t.constructor||Lt(t)?{}:(e=it(t),zt(e)?at(e):{});var e}(D?{}:t),!e)return function(t,e){return Dt(t,Mt(t),e)}(t,function(t,e){return t&&Dt(e,qt(e),t)}(S,t))}else{if(!R[C])return h?t:{};S=function(t,e,r,n){var o=t.constructor;switch(e){case v:return Ct(t);case a:case c:return new o(+t);case w:return function(t,e){var r=e?Ct(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case j:case W:case m:case A:case O:case T:case x:case I:case $:return function(t,e){var r=e?Ct(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case f:return function(t,e,r){return L(e?r(G(t),!0):G(t),F,new t.constructor)}(t,n,r);case l:case d:return new o(t);case y:return function(t){var e=new t.constructor(t.source,E.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return function(t,e,r){return L(e?r(V(t),!0):V(t),H,new t.constructor)}(t,n,r);case b:return i=t,At?Object(At.call(i)):{}}var i}(t,C,Pt,e)}}_||(_=new It);var k=_.get(t);if(k)return k;if(_.set(t,S),!P)var B=r?function(t){return function(t,e,r){var n=e(t);return Ut(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,qt,Mt)}(t):qt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r,t););}(B||t,(function(o,i){B&&(o=t[i=o]),Et(S,i,Pt(o,e,r,n,i,t,_))})),S}function Rt(t){return!(!zt(t)||(e=t,X&&X in e))&&(Nt(t)||K(t)?et:S).test(Kt(t));var e}function Ct(t){var e=new t.constructor(t.byteLength);return new ot(e).set(new ot(t)),e}function Dt(t,e,r,n){r||(r={});for(var o=-1,i=e.length;++o<i;){var a=e[o],c=n?n(r[a],t[a],a,r,t):void 0;Et(r,a,void 0===c?t[a]:c)}return r}function kt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Bt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Rt(r)?r:void 0}Ot.prototype.clear=function(){this.__data__=bt?bt(null):{}},Ot.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Ot.prototype.get=function(t){var e=this.__data__;if(bt){var r=e[t];return r===n?void 0:r}return Z.call(e,t)?e[t]:void 0},Ot.prototype.has=function(t){var e=this.__data__;return bt?void 0!==e[t]:Z.call(e,t)},Ot.prototype.set=function(t,e){return this.__data__[t]=bt&&void 0===e?n:e,this},Tt.prototype.clear=function(){this.__data__=[]},Tt.prototype.delete=function(t){var e=this.__data__,r=St(e,t);return!(r<0)&&(r==e.length-1?e.pop():st.call(e,r,1),!0)},Tt.prototype.get=function(t){var e=this.__data__,r=St(e,t);return r<0?void 0:e[r][1]},Tt.prototype.has=function(t){return St(this.__data__,t)>-1},Tt.prototype.set=function(t,e){var r=this.__data__,n=St(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},xt.prototype.clear=function(){this.__data__={hash:new Ot,map:new(ht||Tt),string:new Ot}},xt.prototype.delete=function(t){return kt(this,t).delete(t)},xt.prototype.get=function(t){return kt(this,t).get(t)},xt.prototype.has=function(t){return kt(this,t).has(t)},xt.prototype.set=function(t,e){return kt(this,t).set(t,e),this},It.prototype.clear=function(){this.__data__=new Tt},It.prototype.delete=function(t){return this.__data__.delete(t)},It.prototype.get=function(t){return this.__data__.get(t)},It.prototype.has=function(t){return this.__data__.has(t)},It.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Tt){var n=r.__data__;if(!ht||n.length<199)return n.push([t,e]),this;r=this.__data__=new xt(n)}return r.set(t,e),this};var Mt=ut?U(ut,Object):function(){return[]},Ft=function(t){return tt.call(t)};function Ht(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||P.test(t))&&t>-1&&t%1==0&&t<e}function Lt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||q)}function Kt(t){if(null!=t){try{return Y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Gt(t,e){return t===e||t!=t&&e!=e}(pt&&Ft(new pt(new ArrayBuffer(1)))!=w||ht&&Ft(new ht)!=f||yt&&Ft(yt.resolve())!=h||gt&&Ft(new gt)!=g||dt&&Ft(new dt)!=_)&&(Ft=function(t){var e=tt.call(t),r=e==p?t.constructor:void 0,n=r?Kt(r):void 0;if(n)switch(n){case _t:return w;case vt:return f;case wt:return h;case jt:return g;case Wt:return _}return e});var Ut=Array.isArray;function Vt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}(t.length)&&!Nt(t)}var Jt=ft||function(){return!1};function Nt(t){var e=zt(t)?tt.call(t):"";return e==s||e==u}function zt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function qt(t){return Vt(t)?$t(t):function(t){if(!Lt(t))return lt(t);var e=[];for(var r in Object(t))Z.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Pt(t,!0,!0)}}(r,r.exports);var n=r.exports;
10
+ var objectFlattenReferencing=(()=>{var _t=Object.create;var I=Object.defineProperty,mt=Object.defineProperties,wt=Object.getOwnPropertyDescriptor,Tt=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertyNames,_e=Object.getOwnPropertySymbols,Ot=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable;var we=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))me.call(t,r)&&we(e,r,t[r]);if(_e)for(var r of _e(t))vt.call(t,r)&&we(e,r,t[r]);return e},Te=(e,t)=>mt(e,Tt(t)),je=e=>I(e,"__esModule",{value:!0});var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xt=(e,t)=>{for(var r in t)I(e,r,{get:t[r],enumerable:!0})},ve=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jt(t))!me.call(e,a)&&(r||a!=="default")&&I(e,a,{get:()=>t[a],enumerable:!(n=wt(t,a))||n.enumerable});return e},H=(e,t)=>ve(je(I(e!=null?_t(Ot(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Wt=(e=>(t,r)=>e&&e.get(t)||(r=ve(je({}),t,1),e&&e.set(t,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var ce=Oe((P,S)=>{var St=200,xe="__lodash_hash_undefined__",We=9007199254740991,Z="[object Arguments]",At="[object Array]",Se="[object Boolean]",Ae="[object Date]",Ct="[object Error]",Q="[object Function]",Ce="[object GeneratorFunction]",K="[object Map]",Ie="[object Number]",z="[object Object]",$e="[object Promise]",Ee="[object RegExp]",L="[object Set]",Pe="[object String]",Me="[object Symbol]",U="[object WeakMap]",Re="[object ArrayBuffer]",B="[object DataView]",De="[object Float32Array]",He="[object Float64Array]",Ke="[object Int8Array]",Le="[object Int16Array]",Be="[object Int32Array]",Fe="[object Uint8Array]",Ge="[object Uint8ClampedArray]",Ne="[object Uint16Array]",Ve="[object Uint32Array]",It=/[\\^$.*+?()[\]{}|]/g,$t=/\w*$/,Et=/^\[object .+?Constructor\]$/,Pt=/^(?:0|[1-9]\d*)$/,h={};h[Z]=h[At]=h[Re]=h[B]=h[Se]=h[Ae]=h[De]=h[He]=h[Ke]=h[Le]=h[Be]=h[K]=h[Ie]=h[z]=h[Ee]=h[L]=h[Pe]=h[Me]=h[Fe]=h[Ge]=h[Ne]=h[Ve]=!0;h[Ct]=h[Q]=h[U]=!1;var Mt=typeof global=="object"&&global&&global.Object===Object&&global,Rt=typeof self=="object"&&self&&self.Object===Object&&self,_=Mt||Rt||Function("return this")(),Je=typeof P=="object"&&P&&!P.nodeType&&P,qe=Je&&typeof S=="object"&&S&&!S.nodeType&&S,Dt=qe&&qe.exports===Je;function Ht(e,t){return e.set(t[0],t[1]),e}function Kt(e,t){return e.add(t),e}function Lt(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Bt(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Xe(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function Ft(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Gt(e,t){return e==null?void 0:e[t]}function Ye(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Ze(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function k(e,t){return function(r){return e(t(r))}}function Qe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Nt=Array.prototype,Vt=Function.prototype,F=Object.prototype,ee=_["__core-js_shared__"],ze=function(){var e=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ue=Vt.toString,w=F.hasOwnProperty,G=F.toString,Jt=RegExp("^"+Ue.call(w).replace(It,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ke=Dt?_.Buffer:void 0,et=_.Symbol,tt=_.Uint8Array,qt=k(Object.getPrototypeOf,Object),Xt=Object.create,Yt=F.propertyIsEnumerable,Zt=Nt.splice,rt=Object.getOwnPropertySymbols,Qt=ke?ke.isBuffer:void 0,zt=k(Object.keys,Object),te=W(_,"DataView"),$=W(_,"Map"),re=W(_,"Promise"),ne=W(_,"Set"),ie=W(_,"WeakMap"),E=W(Object,"create"),Ut=O(te),kt=O($),er=O(re),tr=O(ne),rr=O(ie),nt=et?et.prototype:void 0,it=nt?nt.valueOf:void 0;function T(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function nr(){this.__data__=E?E(null):{}}function ir(e){return this.has(e)&&delete this.__data__[e]}function ar(e){var t=this.__data__;if(E){var r=t[e];return r===xe?void 0:r}return w.call(t,e)?t[e]:void 0}function or(e){var t=this.__data__;return E?t[e]!==void 0:w.call(t,e)}function sr(e,t){var r=this.__data__;return r[e]=E&&t===void 0?xe:t,this}T.prototype.clear=nr;T.prototype.delete=ir;T.prototype.get=ar;T.prototype.has=or;T.prototype.set=sr;function m(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function fr(){this.__data__=[]}function cr(e){var t=this.__data__,r=N(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Zt.call(t,r,1),!0}function lr(e){var t=this.__data__,r=N(t,e);return r<0?void 0:t[r][1]}function ur(e){return N(this.__data__,e)>-1}function hr(e,t){var r=this.__data__,n=N(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}m.prototype.clear=fr;m.prototype.delete=cr;m.prototype.get=lr;m.prototype.has=ur;m.prototype.set=hr;function v(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function gr(){this.__data__={hash:new T,map:new($||m),string:new T}}function pr(e){return V(this,e).delete(e)}function dr(e){return V(this,e).get(e)}function br(e){return V(this,e).has(e)}function yr(e,t){return V(this,e).set(e,t),this}v.prototype.clear=gr;v.prototype.delete=pr;v.prototype.get=dr;v.prototype.has=br;v.prototype.set=yr;function x(e){this.__data__=new m(e)}function _r(){this.__data__=new m}function mr(e){return this.__data__.delete(e)}function wr(e){return this.__data__.get(e)}function Tr(e){return this.__data__.has(e)}function jr(e,t){var r=this.__data__;if(r instanceof m){var n=r.__data__;if(!$||n.length<St-1)return n.push([e,t]),this;r=this.__data__=new v(n)}return r.set(e,t),this}x.prototype.clear=_r;x.prototype.delete=mr;x.prototype.get=wr;x.prototype.has=Tr;x.prototype.set=jr;function Or(e,t){var r=se(e)||Xr(e)?Ft(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||w.call(e,o))&&!(a&&(o=="length"||Nr(o,n)))&&r.push(o);return r}function at(e,t,r){var n=e[t];(!(w.call(e,t)&&ct(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function N(e,t){for(var r=e.length;r--;)if(ct(e[r][0],t))return r;return-1}function vr(e,t){return e&&ot(t,fe(t),e)}function ae(e,t,r,n,a,o,u){var i;if(n&&(i=o?n(e,a,o,u):n(e)),i!==void 0)return i;if(!J(e))return e;var c=se(e);if(c){if(i=Br(e),!t)return Hr(e,i)}else{var l=j(e),d=l==Q||l==Ce;if(Zr(e))return Ir(e,t);if(l==z||l==Z||d&&!o){if(Ye(e))return o?e:{};if(i=Fr(d?{}:e),!t)return Kr(e,vr(i,e))}else{if(!h[l])return o?e:{};i=Gr(e,l,ae,t)}}u||(u=new x);var s=u.get(e);if(s)return s;if(u.set(e,i),!c)var g=r?Lr(e):fe(e);return Lt(g||e,function(f,p){g&&(p=f,f=e[p]),at(i,p,ae(f,t,r,n,p,e,u))}),i}function xr(e){return J(e)?Xt(e):{}}function Wr(e,t,r){var n=t(e);return se(e)?n:Bt(n,r(e))}function Sr(e){return G.call(e)}function Ar(e){if(!J(e)||Jr(e))return!1;var t=ut(e)||Ye(e)?Jt:Et;return t.test(O(e))}function Cr(e){if(!ft(e))return zt(e);var t=[];for(var r in Object(e))w.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ir(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function oe(e){var t=new e.constructor(e.byteLength);return new tt(t).set(new tt(e)),t}function $r(e,t){var r=t?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Er(e,t,r){var n=t?r(Ze(e),!0):Ze(e);return Xe(n,Ht,new e.constructor)}function Pr(e){var t=new e.constructor(e.source,$t.exec(e));return t.lastIndex=e.lastIndex,t}function Mr(e,t,r){var n=t?r(Qe(e),!0):Qe(e);return Xe(n,Kt,new e.constructor)}function Rr(e){return it?Object(it.call(e)):{}}function Dr(e,t){var r=t?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Hr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function ot(e,t,r,n){r||(r={});for(var a=-1,o=t.length;++a<o;){var u=t[a],i=n?n(r[u],e[u],u,r,e):void 0;at(r,u,i===void 0?e[u]:i)}return r}function Kr(e,t){return ot(e,st(e),t)}function Lr(e){return Wr(e,fe,st)}function V(e,t){var r=e.__data__;return Vr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function W(e,t){var r=Gt(e,t);return Ar(r)?r:void 0}var st=rt?k(rt,Object):Ur,j=Sr;(te&&j(new te(new ArrayBuffer(1)))!=B||$&&j(new $)!=K||re&&j(re.resolve())!=$e||ne&&j(new ne)!=L||ie&&j(new ie)!=U)&&(j=function(e){var t=G.call(e),r=t==z?e.constructor:void 0,n=r?O(r):void 0;if(n)switch(n){case Ut:return B;case kt:return K;case er:return $e;case tr:return L;case rr:return U}return t});function Br(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&w.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Fr(e){return typeof e.constructor=="function"&&!ft(e)?xr(qt(e)):{}}function Gr(e,t,r,n){var a=e.constructor;switch(t){case Re:return oe(e);case Se:case Ae:return new a(+e);case B:return $r(e,n);case De:case He:case Ke:case Le:case Be:case Fe:case Ge:case Ne:case Ve:return Dr(e,n);case K:return Er(e,n,r);case Ie:case Pe:return new a(e);case Ee:return Pr(e);case L:return Mr(e,n,r);case Me:return Rr(e)}}function Nr(e,t){return t=t==null?We:t,!!t&&(typeof e=="number"||Pt.test(e))&&e>-1&&e%1==0&&e<t}function Vr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Jr(e){return!!ze&&ze in e}function ft(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||F;return e===r}function O(e){if(e!=null){try{return Ue.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function qr(e){return ae(e,!0,!0)}function ct(e,t){return e===t||e!==e&&t!==t}function Xr(e){return Yr(e)&&w.call(e,"callee")&&(!Yt.call(e,"callee")||G.call(e)==Z)}var se=Array.isArray;function lt(e){return e!=null&&Qr(e.length)&&!ut(e)}function Yr(e){return zr(e)&&lt(e)}var Zr=Qt||kr;function ut(e){var t=J(e)?G.call(e):"";return t==Q||t==Ce}function Qr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=We}function J(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function zr(e){return!!e&&typeof e=="object"}function fe(e){return lt(e)?Or(e):Cr(e)}function Ur(){return[]}function kr(){return!1}S.exports=qr});var ge=Oe((jn,bt)=>{var rn="[object Object]";function nn(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function an(e,t){return function(r){return e(t(r))}}var on=Function.prototype,pt=Object.prototype,dt=on.toString,sn=pt.hasOwnProperty,fn=dt.call(Object),cn=pt.toString,ln=an(Object.getPrototypeOf,Object);function un(e){return!!e&&typeof e=="object"}function hn(e){if(!un(e)||cn.call(e)!=rn||nn(e))return!1;var t=ln(e);if(t===null)return!0;var r=sn.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&dt.call(r)==fn}bt.exports=hn});var bn={};xt(bn,{arrayiffyString:()=>A,defaults:()=>M,flattenArr:()=>R,flattenObject:()=>X,flattenReferencing:()=>dn,version:()=>pn});var be=H(ce(),1);function le(e,t,r=0){if(typeof e!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): first input argument must be a string! Currently it's: ${typeof e}`);if(typeof t!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): second input argument must be a string! Currently it's: ${typeof t}`);if(isNaN(+r)||typeof r=="string"&&!/^\d*$/.test(r))throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): third input argument must be a natural number! Currently it's: ${r}`);let n=Array.from(e),a=Array.from(t);if(n.length===0||a.length===0||r!=null&&+r>=n.length)return[];r||(r=0);let o=[],u=!1,i;for(let c=r,l=n.length;c<l;c++)u&&(n[c]===a[c-+i]?c-+i+1===a.length&&o.push(+i):(i=null,u=!1)),u||n[c]===a[0]&&(a.length===1?o.push(c):(u=!0,i=c));return o}function ue(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var he=new Map,ht=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r=="undefined")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},en=(e,t)=>{t=y({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(he.has(r))return he.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=ue(e).replace(/\\\*/g,"[\\s\\S]*");let a=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return a.negated=n,he.set(r,a),a},tn=(e,t,r,n)=>{if(e=ht(e,"inputs"),t=ht(t,"patterns"),t.length===0)return[];t=t.map(u=>en(u,r));let{allPatterns:a}=r||{},o=[];for(let u of e){let i,c=[...t].fill(!1);for(let[l,d]of t.entries())if(d.test(u)&&(c[l]=!0,i=!d.negated,!i))break;if(!(i===!1||i===void 0&&t.some(l=>!l.negated)||a&&c.some((l,d)=>!l&&!t[d].negated))&&(o.push(u),n))break}return o};function gt(e,t,r){return tn(e,t,r,!0).length>0}var Y=H(ge(),1);var pe=H(ce(),1),de=H(ge(),1),M={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function q(e){return typeof e=="string"}function X(e,t){let r=y(y({},M),t);if(arguments.length===0||Object.keys(e).length===0)return[];let n=(0,pe.default)(e),a=[];return(0,de.default)(n)&&Object.keys(n).forEach(o=>{(0,de.default)(n[o])&&(n[o]=X(n[o],r)),Array.isArray(n[o])&&(a=a.concat(n[o].map(u=>`${o}${r.objectKeyAndValueJoinChar}${u}`))),q(n[o])&&a.push(`${o}${r.objectKeyAndValueJoinChar}${n[o]}`)}),a}function R(e,t,r=!1,n=!1){let a=y(y({},M),t);if(arguments.length===0||e.length===0)return"";let o=(0,pe.default)(e),u="";if(o.length>0)if(n){for(let i=0,c=o.length;i<c;i++)if(q(o[i])){let l;l="",a.mergeArraysWithLineBreaks&&i>0&&(!a.mergeWithoutTrailingBrIfLineContainsBr||typeof o[i-1]!="string"||a.mergeWithoutTrailingBrIfLineContainsBr&&o[i-1]!==void 0&&!o[i-1].toLowerCase().includes("<br"))&&(l=`<br${a.xhtml?" /":""}>`),u+=`${l}${r?a.wrapHeadsWith:""}${o[i]}${r?a.wrapTailsWith:""}`}else if(Array.isArray(o[i])&&o[i].length>0&&o[i].every(q)){let l="";a.mergeArraysWithLineBreaks&&u.length>0&&(l=`<br${a.xhtml?" /":""}>`),u=o[i].reduce((d,s,g,f)=>{let p="";return g!==f.length-1&&(p=" "),d+(g===0?l:"")+(r?a.wrapHeadsWith:"")+s+(r?a.wrapTailsWith:"")+p},u)}}else u=o.reduce((i,c,l,d)=>{let s="";a.mergeArraysWithLineBreaks&&l>0&&(s=`<br${a.xhtml?" /":""}>`);let g="";return l!==d.length-1&&(g=" "),`${i}${l===0?s:""}${r?a.wrapHeadsWith:""}${c}${r?a.wrapTailsWith:""}${g}`},u);return u}function A(e){return q(e)?e.length>0?[e]:[]:e}var yt="6.0.10";var pn=yt;function D(e){return e!=null}function C(e){return typeof e=="string"}function dn(e,t,r){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] reference object missing!");if(D(r)&&!(0,Y.default)(r))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third input, options object must be a plain object. Currently it's: ${typeof r}`);let n=y(y({},M),r);n.dontWrapKeys=A(n.dontWrapKeys),n.preventWrappingIfContains=A(n.preventWrappingIfContains),n.dontWrapPaths=A(n.dontWrapPaths),n.ignore=A(n.ignore),typeof n.whatToDoWhenReferenceIsMissing!="number"&&(n.whatToDoWhenReferenceIsMissing=+n.whatToDoWhenReferenceIsMissing||0);function a(o,u,i,c=!0,l=!0,d=""){let s=(0,be.default)(o),g=(0,be.default)(u);return i.wrapGlobalFlipSwitch||(c=!1),(0,Y.default)(s)?Object.keys(s).forEach(f=>{let p=d+(d.length===0?f:`.${f}`);if(i.ignore.length===0||!i.ignore.includes(f)){if(i.wrapGlobalFlipSwitch&&(c=!0,i.dontWrapKeys.length>0&&(c=c&&!i.dontWrapKeys.some(b=>gt(f,b,{caseSensitive:!0}))),i.dontWrapPaths.length>0&&(c=c&&!i.dontWrapPaths.some(b=>b===p)),i.preventWrappingIfContains.length>0&&typeof s[f]=="string"&&(c=c&&!i.preventWrappingIfContains.some(b=>s[f].includes(b)))),D(g[f])||!D(g[f])&&i.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(s[f]))if(i.whatToDoWhenReferenceIsMissing===2||C(g[f]))s[f]=R(s[f],i,c,l);else{if(s[f].every(b=>typeof b=="string"||Array.isArray(b))){let b=!0;s[f].forEach(ye=>{Array.isArray(ye)&&!ye.every(C)&&(b=!1)}),b&&(l=!1)}s[f]=a(s[f],g[f],i,c,l,p)}else(0,Y.default)(s[f])?i.whatToDoWhenReferenceIsMissing===2||C(g[f])?s[f]=R(X(s[f],i),i,c,l):c?s[f]=a(s[f],g[f],i,c,l,p):s[f]=a(s[f],g[f],Te(y({},i),{wrapGlobalFlipSwitch:!1}),c,l,p):C(s[f])&&(s[f]=a(s[f],g[f],i,c,l,p));else if(typeof s[f]!=typeof g[f]&&i.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] reference object does not have the key ${f} and we need it. TIP: Turn off throwing via opts.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(s)?Array.isArray(g)?s.forEach((f,p)=>{D(s[p])&&D(g[p])?s[p]=a(s[p],g[p],i,c,l,`${d}[${p}]`):s[p]=a(s[p],g[0],i,c,l,`${d}[${p}]`)}):C(g)&&(s=R(s,i,c,l)):C(s)&&s.length>0&&(i.wrapHeadsWith||i.wrapTailsWith)&&(!i.preventDoubleWrapping||(i.wrapHeadsWith===""||!le(s,i.wrapHeadsWith.trim()).length)&&(i.wrapTailsWith===""||!le(s,i.wrapTailsWith.trim()).length))&&(s=`${c?i.wrapHeadsWith:""}${s}${c?i.wrapTailsWith:""}`),s}return a(e,t,n)}return Wt(bn);})();
11
11
  /**
12
12
  * @name str-indexes-of-plus
13
13
  * @fileoverview Like indexOf but returns array and counts per-grapheme
14
- * @version 4.0.4
14
+ * @version 4.0.10
15
15
  * @author Roy Revelt, Codsen Ltd
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/str-indexes-of-plus/}
18
- */function o(t,e,r=0){if("string"!=typeof t)throw new TypeError("str-indexes-of-plus/strIndexesOfPlus(): first input argument must be a string! Currently it's: "+typeof t);if("string"!=typeof e)throw new TypeError("str-indexes-of-plus/strIndexesOfPlus(): second input argument must be a string! Currently it's: "+typeof e);if(isNaN(+r)||"string"==typeof r&&!/^\d*$/.test(r))throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): third input argument must be a natural number! Currently it's: ${r}`);const n=Array.from(t),o=Array.from(e);if(0===n.length||0===o.length||null!=r&&+r>=n.length)return[];r||(r=0);const i=[];let a,c=!1;for(let t=r,e=n.length;t<e;t++)c&&(n[t]===o[t-+a]?t-+a+1===o.length&&i.push(+a):(a=null,c=!1)),c||n[t]===o[0]&&(1===o.length?i.push(t):(c=!0,a=t));return i}const i=new Map,a=(t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter((t=>{if("string"!=typeof t){if(void 0===t)return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof t}' in the array`)}return!0}))},c=(t,e)=>{e={caseSensitive:!1,...e};const r=t+JSON.stringify(e);if(i.has(r))return i.get(r);const n="!"===t[0];n&&(t=t.slice(1)),t=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t).replace(/\\\*/g,"[\\s\\S]*");const o=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return o.negated=n,i.set(r,o),o};function s(t,e,r){return((t,e,r,n)=>{if(t=a(t,"inputs"),0===(e=a(e,"patterns")).length)return[];e=e.map((t=>c(t,r)));const{allPatterns:o}=r||{},i=[];for(const r of t){let t;const a=[...e].fill(!1);for(const[n,o]of e.entries())if(o.test(r)&&(a[n]=!0,t=!o.negated,!t))break;if(!(!1===t||void 0===t&&e.some((t=>!t.negated))||o&&a.some(((t,r)=>!t&&!e[r].negated)))&&(i.push(r),n))break}return i})(t,e,r,!0).length>0}var u,f,l=Object.prototype,p=Function.prototype.toString,h=l.hasOwnProperty,y=p.call(Object),g=l.toString,d=(u=Object.getPrototypeOf,f=Object,function(t){return u(f(t))});var b=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=g.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=d(t);if(null===e)return!0;var r=h.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&p.call(r)==y};const _={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function v(t){return"string"==typeof t}function w(t,e){const r={..._,...e};if(0===arguments.length||0===Object.keys(t).length)return[];const o=n(t);let i=[];return b(o)&&Object.keys(o).forEach((t=>{b(o[t])&&(o[t]=w(o[t],r)),Array.isArray(o[t])&&(i=i.concat(o[t].map((e=>t+r.objectKeyAndValueJoinChar+e)))),v(o[t])&&i.push(t+r.objectKeyAndValueJoinChar+o[t])})),i}function j(t,e,r=!1,o=!1){const i={..._,...e};if(0===arguments.length||0===t.length)return"";const a=n(t);let c="";if(a.length>0)if(o){for(let t=0,e=a.length;t<e;t++)if(v(a[t])){let e;e="",i.mergeArraysWithLineBreaks&&t>0&&(!i.mergeWithoutTrailingBrIfLineContainsBr||"string"!=typeof a[t-1]||i.mergeWithoutTrailingBrIfLineContainsBr&&void 0!==a[t-1]&&!a[t-1].toLowerCase().includes("<br"))&&(e=`<br${i.xhtml?" /":""}>`),c+=e+(r?i.wrapHeadsWith:"")+a[t]+(r?i.wrapTailsWith:"")}else if(Array.isArray(a[t])&&a[t].length>0&&a[t].every(v)){let e="";i.mergeArraysWithLineBreaks&&c.length>0&&(e=`<br${i.xhtml?" /":""}>`),c=a[t].reduce(((t,n,o,a)=>{let c="";return o!==a.length-1&&(c=" "),t+(0===o?e:"")+(r?i.wrapHeadsWith:"")+n+(r?i.wrapTailsWith:"")+c}),c)}}else c=a.reduce(((t,e,n,o)=>{let a="";i.mergeArraysWithLineBreaks&&n>0&&(a=`<br${i.xhtml?" /":""}>`);let c="";return n!==o.length-1&&(c=" "),t+(0===n?a:"")+(r?i.wrapHeadsWith:"")+e+(r?i.wrapTailsWith:"")+c}),c);return c}function W(t){return v(t)?t.length>0?[t]:[]:t}function m(t){return null!=t}function A(t){return"string"==typeof t}t.arrayiffyString=W,t.defaults=_,t.flattenArr=j,t.flattenObject=w,t.flattenReferencing=function(t,e,r){if(0===arguments.length)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(1===arguments.length)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] reference object missing!");if(m(r)&&!b(r))throw new Error("object-flatten-referencing/ofr(): [THROW_ID_03] third input, options object must be a plain object. Currently it's: "+typeof r);const i={..._,...r};function a(t,e,r,i=!0,c=!0,u=""){let f=n(t);const l=n(e);return r.wrapGlobalFlipSwitch||(i=!1),b(f)?Object.keys(f).forEach((t=>{const e=u+(0===u.length?t:`.${t}`);if(0===r.ignore.length||!r.ignore.includes(t))if(r.wrapGlobalFlipSwitch&&(i=!0,r.dontWrapKeys.length>0&&(i=i&&!r.dontWrapKeys.some((e=>s(t,e,{caseSensitive:!0})))),r.dontWrapPaths.length>0&&(i=i&&!r.dontWrapPaths.some((t=>t===e))),r.preventWrappingIfContains.length>0&&"string"==typeof f[t]&&(i=i&&!r.preventWrappingIfContains.some((e=>f[t].includes(e))))),m(l[t])||!m(l[t])&&2===r.whatToDoWhenReferenceIsMissing)if(Array.isArray(f[t]))if(2===r.whatToDoWhenReferenceIsMissing||A(l[t]))f[t]=j(f[t],r,i,c);else{if(f[t].every((t=>"string"==typeof t||Array.isArray(t)))){let e=!0;f[t].forEach((t=>{Array.isArray(t)&&!t.every(A)&&(e=!1)})),e&&(c=!1)}f[t]=a(f[t],l[t],r,i,c,e)}else b(f[t])?f[t]=2===r.whatToDoWhenReferenceIsMissing||A(l[t])?j(w(f[t],r),r,i,c):a(f[t],l[t],i?r:{...r,wrapGlobalFlipSwitch:!1},i,c,e):A(f[t])&&(f[t]=a(f[t],l[t],r,i,c,e));else if(typeof f[t]!=typeof l[t]&&1===r.whatToDoWhenReferenceIsMissing)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] reference object does not have the key ${t} and we need it. TIP: Turn off throwing via opts.whatToDoWhenReferenceIsMissing.`)})):Array.isArray(f)?Array.isArray(l)?f.forEach(((t,e)=>{f[e]=m(f[e])&&m(l[e])?a(f[e],l[e],r,i,c,`${u}[${e}]`):a(f[e],l[0],r,i,c,`${u}[${e}]`)})):A(l)&&(f=j(f,r,i,c)):A(f)&&f.length>0&&(r.wrapHeadsWith||r.wrapTailsWith)&&(r.preventDoubleWrapping&&(""!==r.wrapHeadsWith&&o(f,r.wrapHeadsWith.trim()).length||""!==r.wrapTailsWith&&o(f,r.wrapTailsWith.trim()).length)||(f=(i?r.wrapHeadsWith:"")+f+(i?r.wrapTailsWith:""))),f}return i.dontWrapKeys=W(i.dontWrapKeys),i.preventWrappingIfContains=W(i.preventWrappingIfContains),i.dontWrapPaths=W(i.dontWrapPaths),i.ignore=W(i.ignore),"number"!=typeof i.whatToDoWhenReferenceIsMissing&&(i.whatToDoWhenReferenceIsMissing=+i.whatToDoWhenReferenceIsMissing||0),a(t,e,i)},t.version="6.0.4",Object.defineProperty(t,"__esModule",{value:!0})}));
18
+ */
@@ -1,6 +1,7 @@
1
1
  // Quick Take
2
2
 
3
3
  import { strict as assert } from "assert";
4
+
4
5
  import { flattenReferencing } from "../dist/object-flatten-referencing.esm.js";
5
6
 
6
7
  assert.deepEqual(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "object-flatten-referencing",
3
- "version": "6.0.4",
3
+ "version": "6.0.10",
4
4
  "description": "Flatten complex nested objects according to a reference objects",
5
5
  "keywords": [
6
6
  "advanced",
@@ -33,102 +33,44 @@
33
33
  },
34
34
  "types": "types/index.d.ts",
35
35
  "scripts": {
36
- "build": "rollup -c",
37
- "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
38
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
39
- "clean_types": "../../scripts/cleanTypes.js",
40
- "dev": "rollup -c --dev",
41
- "devunittest": "npm run dev && tap --only -R 'base'",
42
- "esbuild": "node '../../scripts/esbuild.js'",
43
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
44
- "format": "npm run lect && npm run prettier && npm run lint",
45
- "lect": "lect",
46
- "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
47
- "perf": "node perf/check",
48
- "prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
49
- "republish": "npm publish || :",
50
- "tap": "tap",
51
- "pretest": "npm run build",
52
- "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
53
- "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
54
- "tsc": "tsc",
55
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
36
+ "build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
37
+ "dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
38
+ "dts": "rollup -c",
39
+ "examples": "node '../../ops/scripts/run-examples.js'",
40
+ "lect": "node '../../ops/lect/lect.js'",
41
+ "letspublish": "yarn publish || :",
42
+ "lint": "eslint . --fix",
43
+ "perf": "node perf/check.js",
44
+ "prepare": "echo 'ready'",
45
+ "pretest": "yarn run lect && yarn run build",
46
+ "test": "c8 yarn run unit && yarn run examples && yarn run lint",
47
+ "unit": "uvu test"
56
48
  },
57
- "tap": {
58
- "check-coverage": false,
59
- "coverage-report": [
60
- "json-summary",
61
- "text"
62
- ],
63
- "node-arg": [
64
- "--no-warnings",
65
- "--experimental-loader",
66
- "@istanbuljs/esm-loader-hook"
49
+ "engines": {
50
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
51
+ },
52
+ "c8": {
53
+ "check-coverage": true,
54
+ "exclude": [
55
+ "**/test/**/*.*"
67
56
  ],
68
- "timeout": 0
57
+ "lines": 100
69
58
  },
70
59
  "lect": {
71
60
  "licence": {
72
61
  "extras": [
73
62
  ""
74
63
  ]
75
- },
76
- "req": "{ flattenReferencing }",
77
- "various": {
78
- "devDependencies": [
79
- "@types/lodash.clonedeep",
80
- "@types/lodash.isplainobject"
81
- ]
82
64
  }
83
65
  },
84
66
  "dependencies": {
85
- "@babel/runtime": "^7.16.0",
86
67
  "lodash.clonedeep": "^4.5.0",
87
68
  "lodash.isplainobject": "^4.0.6",
88
69
  "matcher": "^5.0.0",
89
- "str-indexes-of-plus": "^4.0.4"
70
+ "str-indexes-of-plus": "^4.0.10"
90
71
  },
91
72
  "devDependencies": {
92
- "@babel/cli": "^7.16.0",
93
- "@babel/core": "^7.16.0",
94
- "@babel/node": "^7.16.0",
95
- "@babel/plugin-external-helpers": "^7.16.0",
96
- "@babel/plugin-proposal-class-properties": "^7.16.0",
97
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
98
- "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
99
- "@babel/plugin-proposal-optional-chaining": "^7.16.0",
100
- "@babel/plugin-transform-runtime": "^7.16.0",
101
- "@babel/preset-env": "^7.16.0",
102
- "@babel/preset-typescript": "^7.16.0",
103
- "@babel/register": "^7.16.0",
104
- "@istanbuljs/esm-loader-hook": "^0.1.2",
105
- "@rollup/plugin-babel": "^5.3.0",
106
- "@rollup/plugin-commonjs": "^21.0.1",
107
- "@rollup/plugin-json": "^4.1.0",
108
- "@rollup/plugin-node-resolve": "^13.0.6",
109
- "@rollup/plugin-strip": "^2.1.0",
110
- "@rollup/plugin-typescript": "^8.3.0",
111
73
  "@types/lodash.clonedeep": "^4.5.6",
112
- "@types/lodash.isplainobject": "^4.0.6",
113
- "@types/node": "^16.11.6",
114
- "@types/tap": "^15.0.5",
115
- "@typescript-eslint/eslint-plugin": "^5.3.0",
116
- "@typescript-eslint/parser": "^5.3.0",
117
- "core-js": "^3.19.1",
118
- "cross-env": "^7.0.3",
119
- "eslint": "^8.1.0",
120
- "lect": "^0.18.4",
121
- "rollup": "^2.59.0",
122
- "rollup-plugin-ascii": "^0.0.3",
123
- "rollup-plugin-banner": "^0.2.1",
124
- "rollup-plugin-cleanup": "^3.2.1",
125
- "rollup-plugin-dts": "^4.0.0",
126
- "rollup-plugin-terser": "^7.0.2",
127
- "tap": "^15.0.10",
128
- "tslib": "^2.3.1",
129
- "typescript": "^4.4.4"
130
- },
131
- "engines": {
132
- "node": ">=12"
74
+ "@types/lodash.isplainobject": "^4.0.6"
133
75
  }
134
76
  }
package/types/index.d.ts CHANGED
File without changes
package/types/util.d.ts CHANGED
File without changes
package/examples/api.json DELETED
@@ -1 +0,0 @@
1
- {"_quickTake.js":{"title":"Quick Take","content":"import &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B; flattenReferencing &#x7D; from \"object-flatten-referencing\";\n\nassert.deepEqual(\n flattenReferencing(\n &#x7B;\n key1: \"val11.val12\",\n key2: \"val21.val22\",\n &#x7D;,\n &#x7B;\n key1: \"Contact us\",\n key2: \"Tel. 0123456789\",\n &#x7D;\n ),\n &#x7B;\n key1: \"%%_val11.val12_%%\",\n key2: \"%%_val21.val22_%%\",\n &#x7D;\n);"}}