@react-hive/honey-utils 3.31.0 → 3.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -1
- package/dist/README.md +79 -1
- package/dist/encoding/decode-base64-json.d.ts +2 -0
- package/dist/encoding/decode-base64.d.ts +2 -0
- package/dist/encoding/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.dev.cjs +121 -0
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/json/index.d.ts +1 -0
- package/dist/json/parse-json.d.ts +2 -0
- package/package.json +5 -6
package/dist/index.d.ts
CHANGED
package/dist/index.dev.cjs
CHANGED
|
@@ -1520,6 +1520,82 @@ const parse2DMatrix = (element) => {
|
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
1522
|
|
|
1523
|
+
/***/ },
|
|
1524
|
+
|
|
1525
|
+
/***/ "./src/encoding/decode-base64-json.ts"
|
|
1526
|
+
/*!********************************************!*\
|
|
1527
|
+
!*** ./src/encoding/decode-base64-json.ts ***!
|
|
1528
|
+
\********************************************/
|
|
1529
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1530
|
+
|
|
1531
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1532
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1533
|
+
/* harmony export */ decodeBase64Json: () => (/* binding */ decodeBase64Json)
|
|
1534
|
+
/* harmony export */ });
|
|
1535
|
+
/* harmony import */ var _json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ~/json */ "./src/json/index.ts");
|
|
1536
|
+
/* harmony import */ var _decode_base64__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./decode-base64 */ "./src/encoding/decode-base64.ts");
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
const decodeBase64Json = (value) => {
|
|
1540
|
+
const decodedValue = (0,_decode_base64__WEBPACK_IMPORTED_MODULE_1__.decodeBase64)(value);
|
|
1541
|
+
if (decodedValue === null) {
|
|
1542
|
+
return null;
|
|
1543
|
+
}
|
|
1544
|
+
return (0,_json__WEBPACK_IMPORTED_MODULE_0__.parseJson)(decodedValue);
|
|
1545
|
+
};
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
/***/ },
|
|
1549
|
+
|
|
1550
|
+
/***/ "./src/encoding/decode-base64.ts"
|
|
1551
|
+
/*!***************************************!*\
|
|
1552
|
+
!*** ./src/encoding/decode-base64.ts ***!
|
|
1553
|
+
\***************************************/
|
|
1554
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1555
|
+
|
|
1556
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1557
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1558
|
+
/* harmony export */ decodeBase64: () => (/* binding */ decodeBase64)
|
|
1559
|
+
/* harmony export */ });
|
|
1560
|
+
const BASE64_PATTERN = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
1561
|
+
const decodeBase64 = (value) => {
|
|
1562
|
+
try {
|
|
1563
|
+
if (!BASE64_PATTERN.test(value)) {
|
|
1564
|
+
return null;
|
|
1565
|
+
}
|
|
1566
|
+
if (typeof Buffer !== 'undefined') {
|
|
1567
|
+
return Buffer.from(value, 'base64').toString('utf-8');
|
|
1568
|
+
}
|
|
1569
|
+
return decodeURIComponent(atob(value)
|
|
1570
|
+
.split('')
|
|
1571
|
+
.map(char => `%${char.charCodeAt(0).toString(16).padStart(2, '0')}`)
|
|
1572
|
+
.join(''));
|
|
1573
|
+
}
|
|
1574
|
+
catch {
|
|
1575
|
+
return null;
|
|
1576
|
+
}
|
|
1577
|
+
};
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
/***/ },
|
|
1581
|
+
|
|
1582
|
+
/***/ "./src/encoding/index.ts"
|
|
1583
|
+
/*!*******************************!*\
|
|
1584
|
+
!*** ./src/encoding/index.ts ***!
|
|
1585
|
+
\*******************************/
|
|
1586
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1587
|
+
|
|
1588
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1589
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1590
|
+
/* harmony export */ decodeBase64: () => (/* reexport safe */ _decode_base64__WEBPACK_IMPORTED_MODULE_0__.decodeBase64),
|
|
1591
|
+
/* harmony export */ decodeBase64Json: () => (/* reexport safe */ _decode_base64_json__WEBPACK_IMPORTED_MODULE_1__.decodeBase64Json)
|
|
1592
|
+
/* harmony export */ });
|
|
1593
|
+
/* harmony import */ var _decode_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decode-base64 */ "./src/encoding/decode-base64.ts");
|
|
1594
|
+
/* harmony import */ var _decode_base64_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./decode-base64-json */ "./src/encoding/decode-base64-json.ts");
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
|
|
1523
1599
|
/***/ },
|
|
1524
1600
|
|
|
1525
1601
|
/***/ "./src/env/index.ts"
|
|
@@ -2604,6 +2680,44 @@ const resolveAxisDelta = (delta, axis, { allowFallback = true, invert = true } =
|
|
|
2604
2680
|
};
|
|
2605
2681
|
|
|
2606
2682
|
|
|
2683
|
+
/***/ },
|
|
2684
|
+
|
|
2685
|
+
/***/ "./src/json/index.ts"
|
|
2686
|
+
/*!***************************!*\
|
|
2687
|
+
!*** ./src/json/index.ts ***!
|
|
2688
|
+
\***************************/
|
|
2689
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2690
|
+
|
|
2691
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2692
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2693
|
+
/* harmony export */ parseJson: () => (/* reexport safe */ _parse_json__WEBPACK_IMPORTED_MODULE_0__.parseJson)
|
|
2694
|
+
/* harmony export */ });
|
|
2695
|
+
/* harmony import */ var _parse_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parse-json */ "./src/json/parse-json.ts");
|
|
2696
|
+
|
|
2697
|
+
|
|
2698
|
+
|
|
2699
|
+
/***/ },
|
|
2700
|
+
|
|
2701
|
+
/***/ "./src/json/parse-json.ts"
|
|
2702
|
+
/*!********************************!*\
|
|
2703
|
+
!*** ./src/json/parse-json.ts ***!
|
|
2704
|
+
\********************************/
|
|
2705
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2706
|
+
|
|
2707
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2708
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2709
|
+
/* harmony export */ parseJson: () => (/* binding */ parseJson)
|
|
2710
|
+
/* harmony export */ });
|
|
2711
|
+
const parseJson = (value) => {
|
|
2712
|
+
try {
|
|
2713
|
+
return JSON.parse(value);
|
|
2714
|
+
}
|
|
2715
|
+
catch {
|
|
2716
|
+
return null;
|
|
2717
|
+
}
|
|
2718
|
+
};
|
|
2719
|
+
|
|
2720
|
+
|
|
2607
2721
|
/***/ },
|
|
2608
2722
|
|
|
2609
2723
|
/***/ "./src/math/hash-string.ts"
|
|
@@ -3592,6 +3706,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3592
3706
|
/* harmony export */ cloneBlob: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_3__.cloneBlob),
|
|
3593
3707
|
/* harmony export */ compact: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.compact),
|
|
3594
3708
|
/* harmony export */ compose: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.compose),
|
|
3709
|
+
/* harmony export */ decodeBase64: () => (/* reexport safe */ _encoding__WEBPACK_IMPORTED_MODULE_18__.decodeBase64),
|
|
3710
|
+
/* harmony export */ decodeBase64Json: () => (/* reexport safe */ _encoding__WEBPACK_IMPORTED_MODULE_18__.decodeBase64Json),
|
|
3595
3711
|
/* harmony export */ definedProps: () => (/* reexport safe */ _object__WEBPACK_IMPORTED_MODULE_12__.definedProps),
|
|
3596
3712
|
/* harmony export */ delay: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.delay),
|
|
3597
3713
|
/* harmony export */ difference: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.difference),
|
|
@@ -3657,6 +3773,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3657
3773
|
/* harmony export */ once: () => (/* reexport safe */ _function__WEBPACK_IMPORTED_MODULE_6__.once),
|
|
3658
3774
|
/* harmony export */ parse2DMatrix: () => (/* reexport safe */ _dom__WEBPACK_IMPORTED_MODULE_3__.parse2DMatrix),
|
|
3659
3775
|
/* harmony export */ parseFileName: () => (/* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_13__.parseFileName),
|
|
3776
|
+
/* harmony export */ parseJson: () => (/* reexport safe */ _json__WEBPACK_IMPORTED_MODULE_17__.parseJson),
|
|
3660
3777
|
/* harmony export */ pipe: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.pipe),
|
|
3661
3778
|
/* harmony export */ readFilesFromDataTransfer: () => (/* reexport safe */ _file__WEBPACK_IMPORTED_MODULE_5__.readFilesFromDataTransfer),
|
|
3662
3779
|
/* harmony export */ reduceAsync: () => (/* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_2__.reduceAsync),
|
|
@@ -3692,6 +3809,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3692
3809
|
/* harmony import */ var _tree__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./tree */ "./src/tree/index.ts");
|
|
3693
3810
|
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./types */ "./src/types.ts");
|
|
3694
3811
|
/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./color */ "./src/color/index.ts");
|
|
3812
|
+
/* harmony import */ var _json__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./json */ "./src/json/index.ts");
|
|
3813
|
+
/* harmony import */ var _encoding__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./encoding */ "./src/encoding/index.ts");
|
|
3814
|
+
|
|
3815
|
+
|
|
3695
3816
|
|
|
3696
3817
|
|
|
3697
3818
|
|