@symbo.ls/scratch 2.11.365 → 2.11.373
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/cjs/factory.js +10 -4
- package/dist/cjs/index.js +20 -8
- package/dist/cjs/set.js +20 -8
- package/dist/cjs/system/color.js +20 -8
- package/dist/cjs/system/document.js +20 -8
- package/dist/cjs/system/font.js +20 -8
- package/dist/cjs/system/index.js +20 -8
- package/dist/cjs/system/reset.js +20 -8
- package/dist/cjs/system/shadow.js +20 -8
- package/dist/cjs/system/spacing.js +20 -8
- package/dist/cjs/system/svg.js +20 -8
- package/dist/cjs/system/theme.js +20 -8
- package/dist/cjs/system/timing.js +20 -8
- package/dist/cjs/system/typography.js +20 -8
- package/dist/cjs/transforms/index.js +20 -8
- package/dist/cjs/utils/color.js +10 -4
- package/dist/cjs/utils/index.js +20 -8
- package/dist/cjs/utils/sequence.js +20 -8
- package/dist/cjs/utils/sprite.js +10 -4
- package/dist/cjs/utils/var.js +20 -8
- package/package.json +2 -2
package/dist/cjs/system/reset.js
CHANGED
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals2.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals2.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals2.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals2.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
|
@@ -320,6 +320,7 @@ var require_cjs = __commonJS({
|
|
|
320
320
|
createNestedObject: () => createNestedObject,
|
|
321
321
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
322
322
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
323
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
323
324
|
joinArrays: () => joinArrays,
|
|
324
325
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
325
326
|
mergeArray: () => mergeArray,
|
|
@@ -334,6 +335,11 @@ var require_cjs = __commonJS({
|
|
|
334
335
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
335
336
|
return arr2.every((val) => arr1.includes(val));
|
|
336
337
|
};
|
|
338
|
+
var getFrequencyInArray = (arr, value) => {
|
|
339
|
+
return arr.reduce((count, currentValue) => {
|
|
340
|
+
return currentValue === value ? count + 1 : count;
|
|
341
|
+
}, 0);
|
|
342
|
+
};
|
|
337
343
|
var removeFromArray = (arr, index) => {
|
|
338
344
|
if ((0, import_types.isString)(index))
|
|
339
345
|
index = parseInt(index);
|
|
@@ -400,7 +406,7 @@ var require_cjs = __commonJS({
|
|
|
400
406
|
newArray.splice(index, 1);
|
|
401
407
|
return newArray;
|
|
402
408
|
}
|
|
403
|
-
return arr
|
|
409
|
+
return arr;
|
|
404
410
|
};
|
|
405
411
|
var removeValueFromArrayAll = (arr, value) => {
|
|
406
412
|
return arr.filter((item) => item !== value);
|
|
@@ -744,7 +750,7 @@ var require_cjs = __commonJS({
|
|
|
744
750
|
continue;
|
|
745
751
|
const objProp = obj[prop];
|
|
746
752
|
if ((0, import_types.isString)(objProp)) {
|
|
747
|
-
if (objProp.includes("=>") || objProp.
|
|
753
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
748
754
|
try {
|
|
749
755
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
750
756
|
destringified[prop] = evalProp;
|
|
@@ -784,11 +790,11 @@ var require_cjs = __commonJS({
|
|
|
784
790
|
}
|
|
785
791
|
return destringified;
|
|
786
792
|
};
|
|
787
|
-
var stringToObject = (str, verbose) => {
|
|
793
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
788
794
|
try {
|
|
789
795
|
return import_globals2.window.eval("(" + str + ")");
|
|
790
796
|
} catch (e) {
|
|
791
|
-
if (verbose)
|
|
797
|
+
if (opts.verbose)
|
|
792
798
|
console.warn(e);
|
|
793
799
|
}
|
|
794
800
|
};
|
|
@@ -1739,6 +1745,7 @@ var require_array = __commonJS({
|
|
|
1739
1745
|
createNestedObject: () => createNestedObject,
|
|
1740
1746
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1741
1747
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1748
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1742
1749
|
joinArrays: () => joinArrays,
|
|
1743
1750
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1744
1751
|
mergeArray: () => mergeArray,
|
|
@@ -1753,6 +1760,11 @@ var require_array = __commonJS({
|
|
|
1753
1760
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1754
1761
|
return arr2.every((val) => arr1.includes(val));
|
|
1755
1762
|
};
|
|
1763
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1764
|
+
return arr.reduce((count, currentValue) => {
|
|
1765
|
+
return currentValue === value ? count + 1 : count;
|
|
1766
|
+
}, 0);
|
|
1767
|
+
};
|
|
1756
1768
|
var removeFromArray = (arr, index) => {
|
|
1757
1769
|
if ((0, import_types.isString)(index))
|
|
1758
1770
|
index = parseInt(index);
|
|
@@ -1819,7 +1831,7 @@ var require_array = __commonJS({
|
|
|
1819
1831
|
newArray.splice(index, 1);
|
|
1820
1832
|
return newArray;
|
|
1821
1833
|
}
|
|
1822
|
-
return arr
|
|
1834
|
+
return arr;
|
|
1823
1835
|
};
|
|
1824
1836
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1825
1837
|
return arr.filter((item) => item !== value);
|
|
@@ -2167,7 +2179,7 @@ var require_object = __commonJS({
|
|
|
2167
2179
|
continue;
|
|
2168
2180
|
const objProp = obj[prop];
|
|
2169
2181
|
if ((0, import_types.isString)(objProp)) {
|
|
2170
|
-
if (objProp.includes("=>") || objProp.
|
|
2182
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2171
2183
|
try {
|
|
2172
2184
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2173
2185
|
destringified[prop] = evalProp;
|
|
@@ -2207,11 +2219,11 @@ var require_object = __commonJS({
|
|
|
2207
2219
|
}
|
|
2208
2220
|
return destringified;
|
|
2209
2221
|
};
|
|
2210
|
-
var stringToObject = (str, verbose) => {
|
|
2222
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2211
2223
|
try {
|
|
2212
2224
|
return import_globals2.window.eval("(" + str + ")");
|
|
2213
2225
|
} catch (e) {
|
|
2214
|
-
if (verbose)
|
|
2226
|
+
if (opts.verbose)
|
|
2215
2227
|
console.warn(e);
|
|
2216
2228
|
}
|
|
2217
2229
|
};
|
package/dist/cjs/system/svg.js
CHANGED
|
@@ -333,6 +333,7 @@ var require_array = __commonJS({
|
|
|
333
333
|
createNestedObject: () => createNestedObject,
|
|
334
334
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
335
335
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
336
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
336
337
|
joinArrays: () => joinArrays,
|
|
337
338
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
338
339
|
mergeArray: () => mergeArray,
|
|
@@ -347,6 +348,11 @@ var require_array = __commonJS({
|
|
|
347
348
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
348
349
|
return arr2.every((val) => arr1.includes(val));
|
|
349
350
|
};
|
|
351
|
+
var getFrequencyInArray = (arr, value) => {
|
|
352
|
+
return arr.reduce((count, currentValue) => {
|
|
353
|
+
return currentValue === value ? count + 1 : count;
|
|
354
|
+
}, 0);
|
|
355
|
+
};
|
|
350
356
|
var removeFromArray = (arr, index) => {
|
|
351
357
|
if ((0, import_types.isString)(index))
|
|
352
358
|
index = parseInt(index);
|
|
@@ -413,7 +419,7 @@ var require_array = __commonJS({
|
|
|
413
419
|
newArray.splice(index, 1);
|
|
414
420
|
return newArray;
|
|
415
421
|
}
|
|
416
|
-
return arr
|
|
422
|
+
return arr;
|
|
417
423
|
};
|
|
418
424
|
var removeValueFromArrayAll = (arr, value) => {
|
|
419
425
|
return arr.filter((item) => item !== value);
|
|
@@ -761,7 +767,7 @@ var require_object = __commonJS({
|
|
|
761
767
|
continue;
|
|
762
768
|
const objProp = obj[prop];
|
|
763
769
|
if ((0, import_types.isString)(objProp)) {
|
|
764
|
-
if (objProp.includes("=>") || objProp.
|
|
770
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
765
771
|
try {
|
|
766
772
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
767
773
|
destringified[prop] = evalProp;
|
|
@@ -801,11 +807,11 @@ var require_object = __commonJS({
|
|
|
801
807
|
}
|
|
802
808
|
return destringified;
|
|
803
809
|
};
|
|
804
|
-
var stringToObject = (str, verbose) => {
|
|
810
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
805
811
|
try {
|
|
806
812
|
return import_globals3.window.eval("(" + str + ")");
|
|
807
813
|
} catch (e) {
|
|
808
|
-
if (verbose)
|
|
814
|
+
if (opts.verbose)
|
|
809
815
|
console.warn(e);
|
|
810
816
|
}
|
|
811
817
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals3.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
package/dist/cjs/system/theme.js
CHANGED
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals2.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals2.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
|
@@ -320,6 +320,7 @@ var require_cjs = __commonJS({
|
|
|
320
320
|
createNestedObject: () => createNestedObject,
|
|
321
321
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
322
322
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
323
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
323
324
|
joinArrays: () => joinArrays,
|
|
324
325
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
325
326
|
mergeArray: () => mergeArray,
|
|
@@ -334,6 +335,11 @@ var require_cjs = __commonJS({
|
|
|
334
335
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
335
336
|
return arr2.every((val) => arr1.includes(val));
|
|
336
337
|
};
|
|
338
|
+
var getFrequencyInArray = (arr, value) => {
|
|
339
|
+
return arr.reduce((count, currentValue) => {
|
|
340
|
+
return currentValue === value ? count + 1 : count;
|
|
341
|
+
}, 0);
|
|
342
|
+
};
|
|
337
343
|
var removeFromArray = (arr, index) => {
|
|
338
344
|
if ((0, import_types.isString)(index))
|
|
339
345
|
index = parseInt(index);
|
|
@@ -400,7 +406,7 @@ var require_cjs = __commonJS({
|
|
|
400
406
|
newArray.splice(index, 1);
|
|
401
407
|
return newArray;
|
|
402
408
|
}
|
|
403
|
-
return arr
|
|
409
|
+
return arr;
|
|
404
410
|
};
|
|
405
411
|
var removeValueFromArrayAll = (arr, value) => {
|
|
406
412
|
return arr.filter((item) => item !== value);
|
|
@@ -744,7 +750,7 @@ var require_cjs = __commonJS({
|
|
|
744
750
|
continue;
|
|
745
751
|
const objProp = obj[prop];
|
|
746
752
|
if ((0, import_types.isString)(objProp)) {
|
|
747
|
-
if (objProp.includes("=>") || objProp.
|
|
753
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
748
754
|
try {
|
|
749
755
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
750
756
|
destringified[prop] = evalProp;
|
|
@@ -784,11 +790,11 @@ var require_cjs = __commonJS({
|
|
|
784
790
|
}
|
|
785
791
|
return destringified;
|
|
786
792
|
};
|
|
787
|
-
var stringToObject = (str, verbose) => {
|
|
793
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
788
794
|
try {
|
|
789
795
|
return import_globals2.window.eval("(" + str + ")");
|
|
790
796
|
} catch (e) {
|
|
791
|
-
if (verbose)
|
|
797
|
+
if (opts.verbose)
|
|
792
798
|
console.warn(e);
|
|
793
799
|
}
|
|
794
800
|
};
|
|
@@ -1739,6 +1745,7 @@ var require_array = __commonJS({
|
|
|
1739
1745
|
createNestedObject: () => createNestedObject,
|
|
1740
1746
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1741
1747
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1748
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1742
1749
|
joinArrays: () => joinArrays,
|
|
1743
1750
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1744
1751
|
mergeArray: () => mergeArray,
|
|
@@ -1753,6 +1760,11 @@ var require_array = __commonJS({
|
|
|
1753
1760
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1754
1761
|
return arr2.every((val) => arr1.includes(val));
|
|
1755
1762
|
};
|
|
1763
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1764
|
+
return arr.reduce((count, currentValue) => {
|
|
1765
|
+
return currentValue === value ? count + 1 : count;
|
|
1766
|
+
}, 0);
|
|
1767
|
+
};
|
|
1756
1768
|
var removeFromArray = (arr, index) => {
|
|
1757
1769
|
if ((0, import_types.isString)(index))
|
|
1758
1770
|
index = parseInt(index);
|
|
@@ -1819,7 +1831,7 @@ var require_array = __commonJS({
|
|
|
1819
1831
|
newArray.splice(index, 1);
|
|
1820
1832
|
return newArray;
|
|
1821
1833
|
}
|
|
1822
|
-
return arr
|
|
1834
|
+
return arr;
|
|
1823
1835
|
};
|
|
1824
1836
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1825
1837
|
return arr.filter((item) => item !== value);
|
|
@@ -2167,7 +2179,7 @@ var require_object = __commonJS({
|
|
|
2167
2179
|
continue;
|
|
2168
2180
|
const objProp = obj[prop];
|
|
2169
2181
|
if ((0, import_types.isString)(objProp)) {
|
|
2170
|
-
if (objProp.includes("=>") || objProp.
|
|
2182
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2171
2183
|
try {
|
|
2172
2184
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2173
2185
|
destringified[prop] = evalProp;
|
|
@@ -2207,11 +2219,11 @@ var require_object = __commonJS({
|
|
|
2207
2219
|
}
|
|
2208
2220
|
return destringified;
|
|
2209
2221
|
};
|
|
2210
|
-
var stringToObject = (str, verbose) => {
|
|
2222
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2211
2223
|
try {
|
|
2212
2224
|
return import_globals2.window.eval("(" + str + ")");
|
|
2213
2225
|
} catch (e) {
|
|
2214
|
-
if (verbose)
|
|
2226
|
+
if (opts.verbose)
|
|
2215
2227
|
console.warn(e);
|
|
2216
2228
|
}
|
|
2217
2229
|
};
|