@stryke/convert 0.6.13 → 0.6.21
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 +287 -0
- package/README.md +18 -9
- package/dist/array-buffer-to-string-C11aVDDi.cjs +1 -0
- package/dist/array-buffer-to-string-Ck1wKcim.mjs +2 -0
- package/dist/array-buffer-to-string-Ck1wKcim.mjs.map +1 -0
- package/dist/array-buffer-to-string-CyitIedv.d.cts +11 -0
- package/dist/array-buffer-to-string-CyitIedv.d.cts.map +1 -0
- package/dist/array-buffer-to-string-DeEBcG3B.d.mts +11 -0
- package/dist/array-buffer-to-string-DeEBcG3B.d.mts.map +1 -0
- package/dist/array-buffer-to-string.cjs +1 -14
- package/dist/array-buffer-to-string.d.cts +2 -0
- package/dist/array-buffer-to-string.d.mts +2 -0
- package/dist/array-buffer-to-string.mjs +1 -1
- package/dist/buffer-to-string-BM0gdjtH.d.cts +14 -0
- package/dist/buffer-to-string-BM0gdjtH.d.cts.map +1 -0
- package/dist/buffer-to-string-C5uu2I9v.cjs +1 -0
- package/dist/buffer-to-string-DOBdYQzE.mjs +2 -0
- package/dist/buffer-to-string-DOBdYQzE.mjs.map +1 -0
- package/dist/buffer-to-string-KwWDaeXZ.d.mts +14 -0
- package/dist/buffer-to-string-KwWDaeXZ.d.mts.map +1 -0
- package/dist/buffer-to-string.cjs +1 -9
- package/dist/buffer-to-string.d.cts +2 -0
- package/dist/buffer-to-string.d.mts +2 -0
- package/dist/buffer-to-string.mjs +1 -1
- package/dist/index.cjs +1 -126
- package/dist/index.d.cts +12 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.mjs +1 -1
- package/dist/neutral.cjs +1 -104
- package/dist/neutral.d.cts +10 -0
- package/dist/neutral.d.mts +10 -0
- package/dist/neutral.mjs +1 -1
- package/dist/parse-type-definition-2UeRPhOv.mjs +2 -0
- package/dist/parse-type-definition-2UeRPhOv.mjs.map +1 -0
- package/dist/parse-type-definition-C6ppBfCe.d.mts +36 -0
- package/dist/parse-type-definition-C6ppBfCe.d.mts.map +1 -0
- package/dist/parse-type-definition-WznwYsLX.d.cts +36 -0
- package/dist/parse-type-definition-WznwYsLX.d.cts.map +1 -0
- package/dist/parse-type-definition-tN_XNvw2.cjs +1 -0
- package/dist/parse-type-definition.cjs +1 -33
- package/dist/parse-type-definition.d.cts +2 -0
- package/dist/parse-type-definition.d.mts +2 -0
- package/dist/parse-type-definition.mjs +1 -1
- package/dist/{string-to-buffer.d.ts → string-to-buffer-Ct8hX_gT.d.mts} +7 -1
- package/dist/string-to-buffer-Ct8hX_gT.d.mts.map +1 -0
- package/dist/string-to-buffer-DT1hmd7E.cjs +1 -0
- package/dist/string-to-buffer-DWEJ2oBO.mjs +2 -0
- package/dist/string-to-buffer-DWEJ2oBO.mjs.map +1 -0
- package/dist/string-to-buffer-DgvrLU6Z.d.cts +26 -0
- package/dist/string-to-buffer-DgvrLU6Z.d.cts.map +1 -0
- package/dist/string-to-buffer.cjs +1 -10
- package/dist/string-to-buffer.d.cts +2 -0
- package/dist/string-to-buffer.d.mts +2 -0
- package/dist/string-to-buffer.mjs +1 -1
- package/dist/string-to-uint8-array-1nnn75lE.cjs +1 -0
- package/dist/string-to-uint8-array-Bemw-wC0.d.mts +25 -0
- package/dist/string-to-uint8-array-Bemw-wC0.d.mts.map +1 -0
- package/dist/string-to-uint8-array-BuyABRFc.d.cts +25 -0
- package/dist/string-to-uint8-array-BuyABRFc.d.cts.map +1 -0
- package/dist/string-to-uint8-array-Cp8Uy9Dd.mjs +2 -0
- package/dist/string-to-uint8-array-Cp8Uy9Dd.mjs.map +1 -0
- package/dist/string-to-uint8-array.cjs +1 -20
- package/dist/string-to-uint8-array.d.cts +2 -0
- package/dist/string-to-uint8-array.d.mts +2 -0
- package/dist/string-to-uint8-array.mjs +1 -1
- package/dist/string-to-utf8-array-BiFS1qOV.mjs +2 -0
- package/dist/string-to-utf8-array-BiFS1qOV.mjs.map +1 -0
- package/dist/string-to-utf8-array-D5Ej2ODQ.d.mts +11 -0
- package/dist/string-to-utf8-array-D5Ej2ODQ.d.mts.map +1 -0
- package/dist/string-to-utf8-array-DcnUcijD.d.cts +11 -0
- package/dist/string-to-utf8-array-DcnUcijD.d.cts.map +1 -0
- package/dist/string-to-utf8-array-DzjMX8ba.cjs +1 -0
- package/dist/string-to-utf8-array.cjs +1 -10
- package/dist/string-to-utf8-array.d.cts +2 -0
- package/dist/string-to-utf8-array.d.mts +2 -0
- package/dist/string-to-utf8-array.mjs +1 -1
- package/dist/to-array-B5vdSOyE.d.mts +20 -0
- package/dist/to-array-B5vdSOyE.d.mts.map +1 -0
- package/dist/to-array-DypOORLR.mjs +2 -0
- package/dist/to-array-DypOORLR.mjs.map +1 -0
- package/dist/to-array-hovilP39.d.cts +20 -0
- package/dist/to-array-hovilP39.d.cts.map +1 -0
- package/dist/to-array-lsJQeHmC.cjs +1 -0
- package/dist/to-array.cjs +1 -9
- package/dist/to-array.d.cts +2 -0
- package/dist/to-array.d.mts +2 -0
- package/dist/to-array.mjs +1 -1
- package/dist/to-string-key-AETeEmqn.cjs +1 -0
- package/dist/to-string-key-BPU8Yayu.mjs +2 -0
- package/dist/to-string-key-BPU8Yayu.mjs.map +1 -0
- package/dist/to-string-key-BsJi969H.d.cts +11 -0
- package/dist/to-string-key-BsJi969H.d.cts.map +1 -0
- package/dist/to-string-key-DepSNY9f.d.mts +11 -0
- package/dist/to-string-key-DepSNY9f.d.mts.map +1 -0
- package/dist/to-string-key.cjs +1 -9
- package/dist/to-string-key.d.cts +2 -0
- package/dist/to-string-key.d.mts +2 -0
- package/dist/to-string-key.mjs +1 -1
- package/dist/{uint8-array-to-stream.d.ts → uint8-array-to-stream-C9Mja3TP.d.cts} +7 -3
- package/dist/uint8-array-to-stream-C9Mja3TP.d.cts.map +1 -0
- package/dist/uint8-array-to-stream-Cihhs2sR.cjs +1 -0
- package/dist/uint8-array-to-stream-DTph8RAX.mjs +2 -0
- package/dist/uint8-array-to-stream-DTph8RAX.mjs.map +1 -0
- package/dist/uint8-array-to-stream-gy0Q2EoT.d.mts +25 -0
- package/dist/uint8-array-to-stream-gy0Q2EoT.d.mts.map +1 -0
- package/dist/uint8-array-to-stream.cjs +1 -31
- package/dist/uint8-array-to-stream.d.cts +2 -0
- package/dist/uint8-array-to-stream.d.mts +2 -0
- package/dist/uint8-array-to-stream.mjs +1 -1
- package/dist/uint8-array-to-string-B1OAtvJr.d.cts +11 -0
- package/dist/uint8-array-to-string-B1OAtvJr.d.cts.map +1 -0
- package/dist/uint8-array-to-string-CQvEdtuI.mjs +2 -0
- package/dist/uint8-array-to-string-CQvEdtuI.mjs.map +1 -0
- package/dist/uint8-array-to-string-CjA1fEXC.d.mts +11 -0
- package/dist/uint8-array-to-string-CjA1fEXC.d.mts.map +1 -0
- package/dist/uint8-array-to-string-CmUiFDa1.cjs +1 -0
- package/dist/uint8-array-to-string.cjs +1 -10
- package/dist/uint8-array-to-string.d.cts +2 -0
- package/dist/uint8-array-to-string.d.mts +2 -0
- package/dist/uint8-array-to-string.mjs +1 -1
- package/dist/{uint8-array-to-string.node.d.ts → uint8-array-to-string.node-BEp4mxNL.d.mts} +5 -1
- package/dist/uint8-array-to-string.node-BEp4mxNL.d.mts.map +1 -0
- package/dist/uint8-array-to-string.node-DAjOixF7.d.cts +14 -0
- package/dist/uint8-array-to-string.node-DAjOixF7.d.cts.map +1 -0
- package/dist/uint8-array-to-string.node-nB1JhZqQ.cjs +1 -0
- package/dist/uint8-array-to-string.node-t7NS2Zmo.mjs +2 -0
- package/dist/uint8-array-to-string.node-t7NS2Zmo.mjs.map +1 -0
- package/dist/uint8-array-to-string.node.cjs +1 -9
- package/dist/uint8-array-to-string.node.d.cts +2 -0
- package/dist/uint8-array-to-string.node.d.mts +2 -0
- package/dist/uint8-array-to-string.node.mjs +1 -1
- package/dist/utf8-array-to-string-BiFD671-.d.cts +11 -0
- package/dist/utf8-array-to-string-BiFD671-.d.cts.map +1 -0
- package/dist/utf8-array-to-string-Brda-b96.d.mts +11 -0
- package/dist/utf8-array-to-string-Brda-b96.d.mts.map +1 -0
- package/dist/utf8-array-to-string-D96sN_nr.mjs +2 -0
- package/dist/utf8-array-to-string-D96sN_nr.mjs.map +1 -0
- package/dist/utf8-array-to-string-lutucTzo.cjs +1 -0
- package/dist/utf8-array-to-string.cjs +1 -10
- package/dist/utf8-array-to-string.d.cts +2 -0
- package/dist/utf8-array-to-string.d.mts +2 -0
- package/dist/utf8-array-to-string.mjs +1 -1
- package/package.json +47 -238
- package/dist/array-buffer-to-string.d.ts +0 -7
- package/dist/buffer-to-string.d.ts +0 -8
- package/dist/index.d.ts +0 -19
- package/dist/neutral.d.ts +0 -9
- package/dist/parse-type-definition.d.ts +0 -8
- package/dist/string-to-uint8-array.d.ts +0 -21
- package/dist/string-to-utf8-array.d.ts +0 -7
- package/dist/to-array.d.ts +0 -9
- package/dist/to-string-key.d.ts +0 -7
- package/dist/uint8-array-to-string.d.ts +0 -7
- package/dist/utf8-array-to-string.d.ts +0 -7
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as arrayBufferToString } from "./array-buffer-to-string-DeEBcG3B.mjs";
|
|
2
|
+
import { t as bufferToString } from "./buffer-to-string-KwWDaeXZ.mjs";
|
|
3
|
+
import { t as parseTypeDefinition } from "./parse-type-definition-C6ppBfCe.mjs";
|
|
4
|
+
import { t as stringToBuffer } from "./string-to-buffer-Ct8hX_gT.mjs";
|
|
5
|
+
import { n as binaryStringToUint8Array, r as stringToUint8Array, t as base64StringToUint8Array } from "./string-to-uint8-array-Bemw-wC0.mjs";
|
|
6
|
+
import { t as stringToUtf8Array } from "./string-to-utf8-array-D5Ej2ODQ.mjs";
|
|
7
|
+
import { t as toArray } from "./to-array-B5vdSOyE.mjs";
|
|
8
|
+
import { t as toStringKey } from "./to-string-key-DepSNY9f.mjs";
|
|
9
|
+
import { n as concatUint8ArrayStream, r as uint8ArrayToStream, t as concatUint8Array } from "./uint8-array-to-stream-gy0Q2EoT.mjs";
|
|
10
|
+
import { t as uint8ArrayToString } from "./uint8-array-to-string.node-BEp4mxNL.mjs";
|
|
11
|
+
import { t as utf8ArrayToString } from "./utf8-array-to-string-Brda-b96.mjs";
|
|
12
|
+
export { arrayBufferToString, base64StringToUint8Array, binaryStringToUint8Array, bufferToString, concatUint8Array, concatUint8ArrayStream, parseTypeDefinition, stringToBuffer, stringToUint8Array, stringToUtf8Array, toArray, toStringKey, uint8ArrayToStream, uint8ArrayToString, utf8ArrayToString };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./array-buffer-to-string-Ck1wKcim.mjs";import{t}from"./buffer-to-string-DOBdYQzE.mjs";import{t as n}from"./parse-type-definition-2UeRPhOv.mjs";import{t as r}from"./string-to-buffer-DWEJ2oBO.mjs";import{n as i,r as a,t as o}from"./string-to-uint8-array-Cp8Uy9Dd.mjs";import{t as s}from"./string-to-utf8-array-BiFS1qOV.mjs";import{t as c}from"./to-array-DypOORLR.mjs";import{t as l}from"./to-string-key-BPU8Yayu.mjs";import{n as u,r as d,t as f}from"./uint8-array-to-stream-DTph8RAX.mjs";import{t as p}from"./uint8-array-to-string.node-t7NS2Zmo.mjs";import{t as m}from"./utf8-array-to-string-D96sN_nr.mjs";export{e as arrayBufferToString,o as base64StringToUint8Array,i as binaryStringToUint8Array,t as bufferToString,f as concatUint8Array,u as concatUint8ArrayStream,n as parseTypeDefinition,r as stringToBuffer,a as stringToUint8Array,s as stringToUtf8Array,c as toArray,l as toStringKey,d as uint8ArrayToStream,p as uint8ArrayToString,m as utf8ArrayToString};
|
package/dist/neutral.cjs
CHANGED
|
@@ -1,104 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _arrayBufferToString = require("./array-buffer-to-string.cjs");
|
|
7
|
-
Object.keys(_arrayBufferToString).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _arrayBufferToString[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _arrayBufferToString[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _parseTypeDefinition = require("./parse-type-definition.cjs");
|
|
18
|
-
Object.keys(_parseTypeDefinition).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _parseTypeDefinition[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _parseTypeDefinition[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _stringToUint8Array = require("./string-to-uint8-array.cjs");
|
|
29
|
-
Object.keys(_stringToUint8Array).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _stringToUint8Array[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _stringToUint8Array[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _stringToUtf8Array = require("./string-to-utf8-array.cjs");
|
|
40
|
-
Object.keys(_stringToUtf8Array).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _stringToUtf8Array[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _stringToUtf8Array[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _toArray = require("./to-array.cjs");
|
|
51
|
-
Object.keys(_toArray).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _toArray[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _toArray[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _toStringKey = require("./to-string-key.cjs");
|
|
62
|
-
Object.keys(_toStringKey).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _toStringKey[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _toStringKey[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _uint8ArrayToStream = require("./uint8-array-to-stream.cjs");
|
|
73
|
-
Object.keys(_uint8ArrayToStream).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _uint8ArrayToStream[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _uint8ArrayToStream[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _uint8ArrayToString = require("./uint8-array-to-string.cjs");
|
|
84
|
-
Object.keys(_uint8ArrayToString).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _uint8ArrayToString[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _uint8ArrayToString[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _utf8ArrayToString = require("./utf8-array-to-string.cjs");
|
|
95
|
-
Object.keys(_utf8ArrayToString).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _utf8ArrayToString[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _utf8ArrayToString[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
1
|
+
const e=require(`./array-buffer-to-string-C11aVDDi.cjs`),t=require(`./parse-type-definition-tN_XNvw2.cjs`),n=require(`./string-to-uint8-array-1nnn75lE.cjs`),r=require(`./string-to-utf8-array-DzjMX8ba.cjs`),i=require(`./to-array-lsJQeHmC.cjs`),a=require(`./to-string-key-AETeEmqn.cjs`),o=require(`./uint8-array-to-stream-Cihhs2sR.cjs`),s=require(`./utf8-array-to-string-lutucTzo.cjs`),c=require(`./uint8-array-to-string-CmUiFDa1.cjs`);exports.arrayBufferToString=e.t,exports.base64StringToUint8Array=n.t,exports.binaryStringToUint8Array=n.n,exports.concatUint8Array=o.t,exports.concatUint8ArrayStream=o.n,exports.parseTypeDefinition=t.t,exports.stringToUint8Array=n.r,exports.stringToUtf8Array=r.t,exports.toArray=i.t,exports.toStringKey=a.t,exports.uint8ArrayToStream=o.r,exports.uint8ArrayToString=c.t,exports.utf8ArrayToString=s.t;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as arrayBufferToString } from "./array-buffer-to-string-CyitIedv.cjs";
|
|
2
|
+
import { t as parseTypeDefinition } from "./parse-type-definition-WznwYsLX.cjs";
|
|
3
|
+
import { n as binaryStringToUint8Array, r as stringToUint8Array, t as base64StringToUint8Array } from "./string-to-uint8-array-BuyABRFc.cjs";
|
|
4
|
+
import { t as stringToUtf8Array } from "./string-to-utf8-array-DcnUcijD.cjs";
|
|
5
|
+
import { t as toArray } from "./to-array-hovilP39.cjs";
|
|
6
|
+
import { t as toStringKey } from "./to-string-key-BsJi969H.cjs";
|
|
7
|
+
import { n as concatUint8ArrayStream, r as uint8ArrayToStream, t as concatUint8Array } from "./uint8-array-to-stream-C9Mja3TP.cjs";
|
|
8
|
+
import { t as utf8ArrayToString } from "./utf8-array-to-string-BiFD671-.cjs";
|
|
9
|
+
import { t as uint8ArrayToString } from "./uint8-array-to-string-B1OAtvJr.cjs";
|
|
10
|
+
export { arrayBufferToString, base64StringToUint8Array, binaryStringToUint8Array, concatUint8Array, concatUint8ArrayStream, parseTypeDefinition, stringToUint8Array, stringToUtf8Array, toArray, toStringKey, uint8ArrayToStream, uint8ArrayToString, utf8ArrayToString };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as arrayBufferToString } from "./array-buffer-to-string-DeEBcG3B.mjs";
|
|
2
|
+
import { t as parseTypeDefinition } from "./parse-type-definition-C6ppBfCe.mjs";
|
|
3
|
+
import { n as binaryStringToUint8Array, r as stringToUint8Array, t as base64StringToUint8Array } from "./string-to-uint8-array-Bemw-wC0.mjs";
|
|
4
|
+
import { t as stringToUtf8Array } from "./string-to-utf8-array-D5Ej2ODQ.mjs";
|
|
5
|
+
import { t as toArray } from "./to-array-B5vdSOyE.mjs";
|
|
6
|
+
import { t as toStringKey } from "./to-string-key-DepSNY9f.mjs";
|
|
7
|
+
import { n as concatUint8ArrayStream, r as uint8ArrayToStream, t as concatUint8Array } from "./uint8-array-to-stream-gy0Q2EoT.mjs";
|
|
8
|
+
import { t as utf8ArrayToString } from "./utf8-array-to-string-Brda-b96.mjs";
|
|
9
|
+
import { t as uint8ArrayToString } from "./uint8-array-to-string-CjA1fEXC.mjs";
|
|
10
|
+
export { arrayBufferToString, base64StringToUint8Array, binaryStringToUint8Array, concatUint8Array, concatUint8ArrayStream, parseTypeDefinition, stringToUint8Array, stringToUtf8Array, toArray, toStringKey, uint8ArrayToStream, uint8ArrayToString, utf8ArrayToString };
|
package/dist/neutral.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{t as e}from"./array-buffer-to-string-Ck1wKcim.mjs";import{t}from"./parse-type-definition-2UeRPhOv.mjs";import{n,r,t as i}from"./string-to-uint8-array-Cp8Uy9Dd.mjs";import{t as a}from"./string-to-utf8-array-BiFS1qOV.mjs";import{t as o}from"./to-array-DypOORLR.mjs";import{t as s}from"./to-string-key-BPU8Yayu.mjs";import{n as c,r as l,t as u}from"./uint8-array-to-stream-DTph8RAX.mjs";import{t as d}from"./utf8-array-to-string-D96sN_nr.mjs";import{t as f}from"./uint8-array-to-string-CQvEdtuI.mjs";export{e as arrayBufferToString,i as base64StringToUint8Array,n as binaryStringToUint8Array,u as concatUint8Array,c as concatUint8ArrayStream,t as parseTypeDefinition,r as stringToUint8Array,a as stringToUtf8Array,o as toArray,s as toStringKey,l as uint8ArrayToStream,f as uint8ArrayToString,d as utf8ArrayToString};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=e=>e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e),t=e=>typeof e==`object`&&!!e,n=n=>{if(!t(n)||e(n)!==`[object Object]`)return!1;if(Object.getPrototypeOf(n)===null)return!0;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r},r=e=>{try{return typeof e==`object`||!!e&&e?.constructor===Object||n(e)}catch{return!1}};typeof Buffer<`u`&&Buffer.isBuffer.bind(Buffer),(e=>(typeof globalThis==`object`||Object.defineProperty(e,`typeDetectGlobalObject`,{get(){return this},configurable:!0}),globalThis))(Object.prototype);const i=e=>{try{return typeof e==`string`}catch{return!1}},a=e=>{if(i(e)){if(e.includes(`:`)){let t=e.split(`:`);if(t.length>1&&t[0])return{file:t[0],name:t[1]}}if(e.includes(`#`)){let t=e.split(`#`);if(t.length>1&&t[0])return{file:t[0],name:t[1]}}return{file:e}}if(r(e))return{file:e.file,name:e.name}};export{a as t};
|
|
2
|
+
//# sourceMappingURL=parse-type-definition-2UeRPhOv.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-type-definition-2UeRPhOv.mjs","names":["isBuffer: typeof Buffer.isBuffer","isBuffer"],"sources":["../../type-checks/src/get-object-tag.ts","../../type-checks/src/is-plain-object.ts","../../type-checks/src/is-object.ts","../../type-checks/src/is-buffer.ts","../../type-checks/src/type-detect.ts","../../type-checks/src/is-string.ts","../src/parse-type-definition.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Gets the `toStringTag` of `obj`.\n *\n * @param value - The obj to query.\n * @returns Returns the `toStringTag`.\n */\nexport const getObjectTag = (value: unknown): string => {\n if (value == null) {\n return value === undefined ? \"[object Undefined]\" : \"[object Null]\";\n }\n return Object.prototype.toString.call(value);\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { PlainObject } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @example\n * ```typescript\n * isObjectLike({})\n * // => true\n *\n * isObjectLike([1, 2, 3])\n * // => true\n *\n * isObjectLike(Function)\n * // => false\n *\n * isObjectLike(null)\n * // => false\n * ```\n *\n * @param value - The value to check.\n * @returns Returns `true` if `value` is object-like, else `false`.\n */\nexport const isObjectLike = (obj: unknown) => {\n return typeof obj === \"object\" && obj !== null;\n};\n\n/**\n * Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @example\n * ```typescript\n * function Foo() {\n * this.a = 1\n * }\n *\n * isPlainObject(new Foo)\n * // => false\n *\n * isPlainObject([1, 2, 3])\n * // => false\n *\n * isPlainObject({ 'x': 0, 'y': 0 })\n * // => true\n *\n * isPlainObject(Object.create(null))\n * // => true\n * ```\n *\n * @param obj - The value to check.\n * @returns Returns `true` if `obj` is a plain object, else `false`.\n */\nexport const isPlainObject = (obj: unknown): obj is PlainObject => {\n if (!isObjectLike(obj) || getObjectTag(obj) !== \"[object Object]\") {\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable ts/no-unsafe-function-type */\n/* eslint-disable ts/no-unsafe-call */\n\nimport type { NativeClass } from \"@stryke/types/base\";\nimport { isPlainObject } from \"./is-plain-object\";\n\n// Prepare\nconst isClassRegex = /^class\\s|^function\\s+[A-Z]/;\nconst isConventionalClassRegex = /^function\\s+[A-Z]/;\nconst isNativeClassRegex = /^class\\s/;\n\n/** Is ES6+ class */\nexport function isNativeClass(value?: any): value is NativeClass {\n // NOTE TO DEVELOPER: If any of this changes, isClass must also be updated\n return (\n typeof value === \"function\" && isNativeClassRegex.test(value.toString())\n );\n}\n\n/**\n * Check if the provided value's type is a conventional class\n *\n * @remarks\n * Is Conventional Class\n * Looks for function with capital first letter MyClass\n * First letter is the 9th character\n * If changed, isClass must also be updated\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is a conventional class\n */\nexport function isConventionalClass(value?: any): value is Function {\n return (\n typeof value === \"function\" &&\n isConventionalClassRegex.test(value.toString())\n );\n}\n\n/**\n * Check if the provided value's type is `Object`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object`\n */\nexport function isClass(value?: any): value is Function | NativeClass; // only guarantee of truth type, not of validity\nexport function isClass(value?: any): boolean {\n return typeof value === \"function\" && isClassRegex.test(value.toString());\n}\n\n/**\n * Check if the provided value's type is `Object`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object`\n */\nexport const isObject = (value: unknown): value is object => {\n try {\n return (\n typeof value === \"object\" ||\n (Boolean(value) && value?.constructor === Object) ||\n isPlainObject(value)\n );\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isBufferExists = typeof Buffer !== \"undefined\";\n\n/**\n * Check if the provided value's type is `Buffer`\n */\nexport const isBuffer: typeof Buffer.isBuffer = isBufferExists\n ? Buffer.isBuffer.bind(Buffer)\n : /**\n * Check if the provided value's type is `Buffer`\n\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Buffer`\n */\n function isBuffer(\n value: Parameters<typeof Buffer.isBuffer>[0]\n ): value is Buffer {\n return false;\n };\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isBuffer } from \"./is-buffer\";\n\nconst globalObject = (Obj => {\n if (typeof globalThis === \"object\") {\n return globalThis;\n }\n Object.defineProperty(Obj, \"typeDetectGlobalObject\", {\n get() {\n return this;\n },\n configurable: true\n });\n\n // // biome-ignore lint/correctness/noUndeclaredVariables: <explanation>\n // const global = typeDetectGlobalObject;\n\n // // biome-ignore lint/performance/noDelete: <explanation>\n // delete Obj.typeDetectGlobalObject;\n return globalThis;\n})(Object.prototype);\n\nexport function typeDetect(obj: unknown): string {\n // NOTE: isBuffer must execute before type-detect,\n // because type-detect returns 'Uint8Array'.\n if (isBuffer(obj)) {\n return \"Buffer\";\n }\n\n const typeofObj = typeof obj;\n if (typeofObj !== \"object\") {\n return typeofObj;\n }\n\n if (obj === null) {\n return \"null\";\n }\n\n if (obj === globalObject) {\n return \"global\";\n }\n\n if (\n Array.isArray(obj) &&\n (Symbol.toStringTag === undefined || !(Symbol.toStringTag in obj))\n ) {\n return \"Array\";\n }\n\n // https://html.spec.whatwg.org/multipage/browsers.html#location\n if (typeof globalThis === \"object\" && globalThis !== null) {\n if (\n typeof (globalThis as any).location === \"object\" &&\n obj === (globalThis as any).location\n ) {\n return \"Location\";\n }\n\n // https://html.spec.whatwg.org/#document\n if (\n typeof (globalThis as any).document === \"object\" &&\n obj === (globalThis as any).document\n ) {\n return \"Document\";\n }\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray\n if (typeof (globalThis as any).navigator === \"object\") {\n if (\n typeof (globalThis as any).navigator.mimeTypes === \"object\" &&\n obj === (globalThis as any).navigator.mimeTypes\n ) {\n return \"MimeTypeArray\";\n }\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray\n if (\n typeof (globalThis as any).navigator.plugins === \"object\" &&\n obj === (globalThis as any).navigator.plugins\n ) {\n return \"PluginArray\";\n }\n }\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray\n if (\n (typeof (globalThis as any).HTMLElement === \"function\" ||\n typeof (globalThis as any).HTMLElement === \"object\") &&\n obj instanceof (globalThis as any).HTMLElement\n ) {\n if ((obj as any).tagName === \"BLOCKQUOTE\") {\n return \"HTMLQuoteElement\";\n }\n\n // https://html.spec.whatwg.org/#htmltabledatacellelement\n if ((obj as any).tagName === \"TD\") {\n return \"HTMLTableDataCellElement\";\n }\n\n // https://html.spec.whatwg.org/#htmltableheadercellelement\n if ((obj as any).tagName === \"TH\") {\n return \"HTMLTableHeaderCellElement\";\n }\n }\n }\n\n const stringTag =\n Symbol.toStringTag !== undefined && (obj as any)[Symbol.toStringTag];\n if (typeof stringTag === \"string\") {\n return stringTag;\n }\n\n const objPrototype = Object.getPrototypeOf(obj);\n if (objPrototype === RegExp.prototype) {\n return \"RegExp\";\n }\n\n if (objPrototype === Date.prototype) {\n return \"Date\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag\n if (typeof Promise !== \"undefined\" && objPrototype === Promise.prototype) {\n return \"Promise\";\n }\n\n if (typeof Set !== \"undefined\" && objPrototype === Set.prototype) {\n return \"Set\";\n }\n\n if (typeof Map !== \"undefined\" && objPrototype === Map.prototype) {\n return \"Map\";\n }\n\n if (typeof WeakSet !== \"undefined\" && objPrototype === WeakSet.prototype) {\n return \"WeakSet\";\n }\n\n if (typeof WeakMap !== \"undefined\" && objPrototype === WeakMap.prototype) {\n return \"WeakMap\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag\n if (typeof DataView !== \"undefined\" && objPrototype === DataView.prototype) {\n return \"DataView\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag\n if (\n typeof Map !== \"undefined\" &&\n objPrototype === Object.getPrototypeOf(new Map().entries())\n ) {\n return \"Map Iterator\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag\n if (\n typeof Set !== \"undefined\" &&\n objPrototype === Object.getPrototypeOf(new Set().entries())\n ) {\n return \"Set Iterator\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag\n if (\n typeof Array.prototype[Symbol.iterator] === \"function\" &&\n objPrototype === Object.getPrototypeOf([][Symbol.iterator]())\n ) {\n return \"Array Iterator\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag\n if (\n Symbol.iterator !== undefined &&\n typeof String.prototype[Symbol.iterator] === \"function\" &&\n Object.getPrototypeOf(\"\"[Symbol.iterator]()) &&\n objPrototype === Object.getPrototypeOf(\"\"[Symbol.iterator]())\n ) {\n return \"String Iterator\";\n }\n\n if (objPrototype === null) {\n return \"Object\";\n }\n\n return Object.prototype.toString.call(obj).slice(8, -1);\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isObject, isString } from \"@stryke/type-checks\";\nimport type {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\n\n/**\n * Parse a type definition parameter into a {@link TypeDefinition} object\n *\n * @param param - The parameter to parse\n * @returns The parsed type definition\n */\nexport const parseTypeDefinition = (\n param: TypeDefinitionParameter\n): TypeDefinition | undefined => {\n if (isString(param)) {\n if (param.includes(\":\")) {\n const params = param.split(\":\");\n if (params.length > 1 && params[0]) {\n return {\n file: params[0],\n name: params[1]\n };\n }\n }\n\n if (param.includes(\"#\")) {\n const params = param.split(\"#\");\n if (params.length > 1 && params[0]) {\n return {\n file: params[0],\n name: params[1]\n };\n }\n }\n\n return {\n file: param\n };\n }\n\n if (isObject(param)) {\n return {\n file: param.file,\n name: param.name\n };\n }\n\n return undefined;\n};\n"],"mappings":"AAwBA,MAAa,EAAgB,GACvB,GAAS,KACJ,IAAU,IAAA,GAAY,qBAAuB,gBAE/C,OAAO,UAAU,SAAS,KAAK,EAAM,CCejC,EAAgB,GACpB,OAAO,GAAQ,YAAY,EA4BvB,EAAiB,GAAqC,CACjE,GAAI,CAAC,EAAa,EAAI,EAAI,EAAa,EAAI,GAAK,kBAC9C,MAAO,GAET,GAAI,OAAO,eAAe,EAAI,GAAK,KACjC,MAAO,GAET,IAAI,EAAQ,EACZ,KAAO,OAAO,eAAe,EAAM,GAAK,MACtC,EAAQ,OAAO,eAAe,EAAM,CAEtC,OAAO,OAAO,eAAe,EAAI,GAAK,GCV3B,EAAY,GAAoC,CAC3D,GAAI,CACF,OACE,OAAO,GAAU,UAChB,EAAQ,GAAU,GAAO,cAAgB,QAC1C,EAAc,EAAM,MAEhB,CACN,MAAO,KC/DmB,OAAO,OAAW,KAM5C,OAAO,SAAS,KAAK,OAAO,ECJV,IAChB,OAAO,YAAe,UAG1B,OAAO,eAAe,EAAK,yBAA0B,CACnD,KAAM,CACJ,OAAO,MAET,aAAc,GACf,CAAC,CAPO,aAeR,OAAO,UAAU,CCnBpB,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OAAO,OAAO,GAAU,cAClB,CACN,MAAO,KCQE,EACX,GAC+B,CAC/B,GAAI,EAAS,EAAM,CAAE,CACnB,GAAI,EAAM,SAAS,IAAI,CAAE,CACvB,IAAM,EAAS,EAAM,MAAM,IAAI,CAC/B,GAAI,EAAO,OAAS,GAAK,EAAO,GAC9B,MAAO,CACL,KAAM,EAAO,GACb,KAAM,EAAO,GACd,CAIL,GAAI,EAAM,SAAS,IAAI,CAAE,CACvB,IAAM,EAAS,EAAM,MAAM,IAAI,CAC/B,GAAI,EAAO,OAAS,GAAK,EAAO,GAC9B,MAAO,CACL,KAAM,EAAO,GACb,KAAM,EAAO,GACd,CAIL,MAAO,CACL,KAAM,EACP,CAGH,GAAI,EAAS,EAAM,CACjB,MAAO,CACL,KAAM,EAAM,KACZ,KAAM,EAAM,KACb"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region ../types/src/configuration.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Configuration values for specifying a type definition
|
|
4
|
+
*/
|
|
5
|
+
interface TypeDefinition {
|
|
6
|
+
/**
|
|
7
|
+
* The file path to the type definition
|
|
8
|
+
*/
|
|
9
|
+
file: string;
|
|
10
|
+
/**
|
|
11
|
+
* The name of the type definition in the file above
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* If no value is provided, we will attempt to infer the type definition from the module's `default` export.
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Configuration parameter for the {@link TypeDefinition} utility type
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* When provided as a string, this value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#EnvConfiguration"`.
|
|
23
|
+
*/
|
|
24
|
+
type TypeDefinitionParameter = TypeDefinition | string;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/parse-type-definition.d.ts
|
|
27
|
+
/**
|
|
28
|
+
* Parse a type definition parameter into a {@link TypeDefinition} object
|
|
29
|
+
*
|
|
30
|
+
* @param param - The parameter to parse
|
|
31
|
+
* @returns The parsed type definition
|
|
32
|
+
*/
|
|
33
|
+
declare const parseTypeDefinition: (param: TypeDefinitionParameter) => TypeDefinition | undefined;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { parseTypeDefinition as t };
|
|
36
|
+
//# sourceMappingURL=parse-type-definition-C6ppBfCe.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-type-definition-C6ppBfCe.d.mts","names":[],"sources":["../../types/src/configuration.ts","../src/parse-type-definition.ts"],"sourcesContent":[],"mappings":";;AAqBA;AAqBA;UArBiB,cAAA;;;ACSjB;;;;;;;;;;;;;;;;KDYY,uBAAA,GAA0B;;;AArBtC;AAqBA;;;;ACZA;cAAa,6BACJ,4BACN"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region ../types/src/configuration.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Configuration values for specifying a type definition
|
|
4
|
+
*/
|
|
5
|
+
interface TypeDefinition {
|
|
6
|
+
/**
|
|
7
|
+
* The file path to the type definition
|
|
8
|
+
*/
|
|
9
|
+
file: string;
|
|
10
|
+
/**
|
|
11
|
+
* The name of the type definition in the file above
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* If no value is provided, we will attempt to infer the type definition from the module's `default` export.
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Configuration parameter for the {@link TypeDefinition} utility type
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* When provided as a string, this value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#EnvConfiguration"`.
|
|
23
|
+
*/
|
|
24
|
+
type TypeDefinitionParameter = TypeDefinition | string;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/parse-type-definition.d.ts
|
|
27
|
+
/**
|
|
28
|
+
* Parse a type definition parameter into a {@link TypeDefinition} object
|
|
29
|
+
*
|
|
30
|
+
* @param param - The parameter to parse
|
|
31
|
+
* @returns The parsed type definition
|
|
32
|
+
*/
|
|
33
|
+
declare const parseTypeDefinition: (param: TypeDefinitionParameter) => TypeDefinition | undefined;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { parseTypeDefinition as t };
|
|
36
|
+
//# sourceMappingURL=parse-type-definition-WznwYsLX.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-type-definition-WznwYsLX.d.cts","names":[],"sources":["../../types/src/configuration.ts","../src/parse-type-definition.ts"],"sourcesContent":[],"mappings":";;AAqBA;AAqBA;UArBiB,cAAA;;;ACSjB;;;;;;;;;;;;;;;;KDYY,uBAAA,GAA0B;;;AArBtC;AAqBA;;;;ACZA;cAAa,6BACJ,4BACN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e),t=e=>typeof e==`object`&&!!e,n=n=>{if(!t(n)||e(n)!==`[object Object]`)return!1;if(Object.getPrototypeOf(n)===null)return!0;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r},r=e=>{try{return typeof e==`object`||!!e&&e?.constructor===Object||n(e)}catch{return!1}},i=typeof Buffer<`u`,a=i?Buffer.isBuffer.bind(Buffer):function(e){return!1},o=(e=>(typeof globalThis==`object`||Object.defineProperty(e,`typeDetectGlobalObject`,{get(){return this},configurable:!0}),globalThis))(Object.prototype),s=e=>{try{return typeof e==`string`}catch{return!1}},c=e=>{if(s(e)){if(e.includes(`:`)){let t=e.split(`:`);if(t.length>1&&t[0])return{file:t[0],name:t[1]}}if(e.includes(`#`)){let t=e.split(`#`);if(t.length>1&&t[0])return{file:t[0],name:t[1]}}return{file:e}}if(r(e))return{file:e.file,name:e.name}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.parseTypeDefinition = void 0;
|
|
7
|
-
var _typeChecks = require("@stryke/type-checks");
|
|
8
|
-
const parseTypeDefinition = e => {
|
|
9
|
-
if ((0, _typeChecks.isString)(e)) {
|
|
10
|
-
if (e.includes(":")) {
|
|
11
|
-
const i = e.split(":");
|
|
12
|
-
if (i.length > 1 && i[0]) return {
|
|
13
|
-
file: i[0],
|
|
14
|
-
name: i[1]
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
if (e.includes("#")) {
|
|
18
|
-
const i = e.split("#");
|
|
19
|
-
if (i.length > 1 && i[0]) return {
|
|
20
|
-
file: i[0],
|
|
21
|
-
name: i[1]
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
file: e
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
if ((0, _typeChecks.isObject)(e)) return {
|
|
29
|
-
file: e.file,
|
|
30
|
-
name: e.name
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
exports.parseTypeDefinition = parseTypeDefinition;
|
|
1
|
+
const e=require(`./parse-type-definition-tN_XNvw2.cjs`);exports.parseTypeDefinition=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./parse-type-definition-2UeRPhOv.mjs";export{e as parseTypeDefinition};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
|
+
|
|
3
|
+
//#region src/string-to-buffer.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* Converts a string to a Buffer.
|
|
4
7
|
*
|
|
@@ -17,4 +20,7 @@ import { Buffer } from "node:buffer";
|
|
|
17
20
|
* @see https://stackoverflow.com/a/41798356/1465919
|
|
18
21
|
*
|
|
19
22
|
*/
|
|
20
|
-
|
|
23
|
+
declare function stringToBuffer(str: string): Buffer;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { stringToBuffer as t };
|
|
26
|
+
//# sourceMappingURL=string-to-buffer-Ct8hX_gT.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-buffer-Ct8hX_gT.d.mts","names":[],"sources":["../src/string-to-buffer.ts"],"sourcesContent":[],"mappings":";;;;;;AAsCA;;;;;;;;;;;;;;;;iBAAgB,cAAA,eAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require(`node:buffer`);function t(t){return e.Buffer.from(t,`utf8`)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-buffer-DWEJ2oBO.mjs","names":[],"sources":["../src/string-to-buffer.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Buffer } from \"node:buffer\";\n\n/**\n * Converts a string to a Buffer.\n *\n * @param str - The string to convert.\n * @returns The converted Buffer.\n *\n * @example\n * ```ts\n * import { stringToBuffer } from \"@stryke/convert\";\n *\n * const buffer = stringToBuffer(\"Hello, world!\");\n * console.log(buffer); // <Buffer 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21>\n * ```\n * @see https://nodejs.org/api/buffer.html#buffer_class_buffer\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Buffer\n * @see https://stackoverflow.com/a/41798356/1465919\n *\n */\nexport function stringToBuffer(str: string): Buffer {\n return Buffer.from(str, \"utf8\");\n}\n"],"mappings":"qCAsCA,SAAgB,EAAe,EAAqB,CAClD,OAAO,EAAO,KAAK,EAAK,OAAO"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
|
|
3
|
+
//#region src/string-to-buffer.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Converts a string to a Buffer.
|
|
7
|
+
*
|
|
8
|
+
* @param str - The string to convert.
|
|
9
|
+
* @returns The converted Buffer.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { stringToBuffer } from "@stryke/convert";
|
|
14
|
+
*
|
|
15
|
+
* const buffer = stringToBuffer("Hello, world!");
|
|
16
|
+
* console.log(buffer); // <Buffer 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21>
|
|
17
|
+
* ```
|
|
18
|
+
* @see https://nodejs.org/api/buffer.html#buffer_class_buffer
|
|
19
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Buffer
|
|
20
|
+
* @see https://stackoverflow.com/a/41798356/1465919
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
declare function stringToBuffer(str: string): Buffer;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { stringToBuffer as t };
|
|
26
|
+
//# sourceMappingURL=string-to-buffer-DgvrLU6Z.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-buffer-DgvrLU6Z.d.cts","names":[],"sources":["../src/string-to-buffer.ts"],"sourcesContent":[],"mappings":";;;;;;AAsCA;;;;;;;;;;;;;;;;iBAAgB,cAAA,eAA6B"}
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.stringToBuffer = stringToBuffer;
|
|
7
|
-
var _nodeBuffer = require("node:buffer");
|
|
8
|
-
function stringToBuffer(r) {
|
|
9
|
-
return _nodeBuffer.Buffer.from(r, "utf8");
|
|
10
|
-
}
|
|
1
|
+
const e=require(`./string-to-buffer-DT1hmd7E.cjs`);exports.stringToBuffer=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./string-to-buffer-DWEJ2oBO.mjs";export{e as stringToBuffer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return Uint8Array.from([...encodeURIComponent(e)].map(e=>e.codePointAt(0)))}function t(e){let t=e.length,n=new Uint8Array(t);for(let r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}function n(t){return e(atob(t))}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/string-to-uint8-array.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Convert a string to Uint8Array
|
|
4
|
+
*
|
|
5
|
+
* @param text - The text to convert
|
|
6
|
+
* @returns The converted Uint8Array
|
|
7
|
+
*/
|
|
8
|
+
declare function stringToUint8Array(text: string): Uint8Array;
|
|
9
|
+
/**
|
|
10
|
+
* Convert a binary string to Uint8Array
|
|
11
|
+
*
|
|
12
|
+
* @param binary - The binary string to convert
|
|
13
|
+
* @returns The converted Uint8Array
|
|
14
|
+
*/
|
|
15
|
+
declare function binaryStringToUint8Array(binary: string): Uint8Array;
|
|
16
|
+
/**
|
|
17
|
+
* Convert a base64 string to a Uint8Array
|
|
18
|
+
*
|
|
19
|
+
* @param data - The base64 string to convert
|
|
20
|
+
* @returns The converted Uint8Array
|
|
21
|
+
*/
|
|
22
|
+
declare function base64StringToUint8Array(data: string): Uint8Array;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { binaryStringToUint8Array as n, stringToUint8Array as r, base64StringToUint8Array as t };
|
|
25
|
+
//# sourceMappingURL=string-to-uint8-array-Bemw-wC0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-uint8-array-Bemw-wC0.d.mts","names":[],"sources":["../src/string-to-uint8-array.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAYA;AAeA;;;iBA3BgB,kBAAA,gBAAkC;;;;;;;iBAYlC,wBAAA,kBAA0C;;;;;;;iBAe1C,wBAAA,gBAAwC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/string-to-uint8-array.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Convert a string to Uint8Array
|
|
4
|
+
*
|
|
5
|
+
* @param text - The text to convert
|
|
6
|
+
* @returns The converted Uint8Array
|
|
7
|
+
*/
|
|
8
|
+
declare function stringToUint8Array(text: string): Uint8Array;
|
|
9
|
+
/**
|
|
10
|
+
* Convert a binary string to Uint8Array
|
|
11
|
+
*
|
|
12
|
+
* @param binary - The binary string to convert
|
|
13
|
+
* @returns The converted Uint8Array
|
|
14
|
+
*/
|
|
15
|
+
declare function binaryStringToUint8Array(binary: string): Uint8Array;
|
|
16
|
+
/**
|
|
17
|
+
* Convert a base64 string to a Uint8Array
|
|
18
|
+
*
|
|
19
|
+
* @param data - The base64 string to convert
|
|
20
|
+
* @returns The converted Uint8Array
|
|
21
|
+
*/
|
|
22
|
+
declare function base64StringToUint8Array(data: string): Uint8Array;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { binaryStringToUint8Array as n, stringToUint8Array as r, base64StringToUint8Array as t };
|
|
25
|
+
//# sourceMappingURL=string-to-uint8-array-BuyABRFc.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-uint8-array-BuyABRFc.d.cts","names":[],"sources":["../src/string-to-uint8-array.ts"],"sourcesContent":[],"mappings":";;AAwBA;AAYA;AAeA;;;iBA3BgB,kBAAA,gBAAkC;;;;;;;iBAYlC,wBAAA,kBAA0C;;;;;;;iBAe1C,wBAAA,gBAAwC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){return Uint8Array.from([...encodeURIComponent(e)].map(e=>e.codePointAt(0)))}function t(e){let t=e.length,n=new Uint8Array(t);for(let r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}function n(t){return e(atob(t))}export{t as n,e as r,n as t};
|
|
2
|
+
//# sourceMappingURL=string-to-uint8-array-Cp8Uy9Dd.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-uint8-array-Cp8Uy9Dd.mjs","names":[],"sources":["../src/string-to-uint8-array.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert a string to Uint8Array\n *\n * @param text - The text to convert\n * @returns The converted Uint8Array\n */\nexport function stringToUint8Array(text: string): Uint8Array {\n return Uint8Array.from(\n [...encodeURIComponent(text)].map(letter => letter.codePointAt(0)!)\n );\n}\n\n/**\n * Convert a binary string to Uint8Array\n *\n * @param binary - The binary string to convert\n * @returns The converted Uint8Array\n */\nexport function binaryStringToUint8Array(binary: string): Uint8Array {\n const len = binary.length;\n const arr = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n arr[i] = binary.charCodeAt(i);\n }\n return arr;\n}\n\n/**\n * Convert a base64 string to a Uint8Array\n *\n * @param data - The base64 string to convert\n * @returns The converted Uint8Array\n */\nexport function base64StringToUint8Array(data: string): Uint8Array {\n return stringToUint8Array(atob(data));\n}\n"],"mappings":"AAwBA,SAAgB,EAAmB,EAA0B,CAC3D,OAAO,WAAW,KAChB,CAAC,GAAG,mBAAmB,EAAK,CAAC,CAAC,IAAI,GAAU,EAAO,YAAY,EAAE,CAAE,CACpE,CASH,SAAgB,EAAyB,EAA4B,CACnE,IAAM,EAAM,EAAO,OACb,EAAM,IAAI,WAAW,EAAI,CAC/B,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,IACvB,EAAI,GAAK,EAAO,WAAW,EAAE,CAE/B,OAAO,EAST,SAAgB,EAAyB,EAA0B,CACjE,OAAO,EAAmB,KAAK,EAAK,CAAC"}
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.base64StringToUint8Array = base64StringToUint8Array;
|
|
7
|
-
exports.binaryStringToUint8Array = binaryStringToUint8Array;
|
|
8
|
-
exports.stringToUint8Array = stringToUint8Array;
|
|
9
|
-
function stringToUint8Array(r) {
|
|
10
|
-
return Uint8Array.from([...encodeURIComponent(r)].map(n => n.codePointAt(0)));
|
|
11
|
-
}
|
|
12
|
-
function binaryStringToUint8Array(r) {
|
|
13
|
-
const n = r.length,
|
|
14
|
-
o = new Uint8Array(n);
|
|
15
|
-
for (let t = 0; t < n; t++) o[t] = r.charCodeAt(t);
|
|
16
|
-
return o;
|
|
17
|
-
}
|
|
18
|
-
function base64StringToUint8Array(r) {
|
|
19
|
-
return stringToUint8Array(atob(r));
|
|
20
|
-
}
|
|
1
|
+
const e=require(`./string-to-uint8-array-1nnn75lE.cjs`);exports.base64StringToUint8Array=e.t,exports.binaryStringToUint8Array=e.n,exports.stringToUint8Array=e.r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{n as e,r as t,t as n}from"./string-to-uint8-array-Cp8Uy9Dd.mjs";export{n as base64StringToUint8Array,e as binaryStringToUint8Array,t as stringToUint8Array};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-utf8-array-BiFS1qOV.mjs","names":[],"sources":["../src/string-to-utf8-array.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst encoder = new TextEncoder();\n\n/**\n * Convert a string to a utf-8 array\n *\n * @param input - The string to convert\n * @returns The converted utf-8 array\n */\nexport function stringToUtf8Array(input: string): Uint8Array {\n return encoder.encode(input);\n}\n"],"mappings":"AAkBA,MAAM,EAAU,IAAI,YAQpB,SAAgB,EAAkB,EAA2B,CAC3D,OAAO,EAAQ,OAAO,EAAM"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/string-to-utf8-array.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Convert a string to a utf-8 array
|
|
4
|
+
*
|
|
5
|
+
* @param input - The string to convert
|
|
6
|
+
* @returns The converted utf-8 array
|
|
7
|
+
*/
|
|
8
|
+
declare function stringToUtf8Array(input: string): Uint8Array;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { stringToUtf8Array as t };
|
|
11
|
+
//# sourceMappingURL=string-to-utf8-array-D5Ej2ODQ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-utf8-array-D5Ej2ODQ.d.mts","names":[],"sources":["../src/string-to-utf8-array.ts"],"sourcesContent":[],"mappings":";;AA0BA;;;;;iBAAgB,iBAAA,iBAAkC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/string-to-utf8-array.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Convert a string to a utf-8 array
|
|
4
|
+
*
|
|
5
|
+
* @param input - The string to convert
|
|
6
|
+
* @returns The converted utf-8 array
|
|
7
|
+
*/
|
|
8
|
+
declare function stringToUtf8Array(input: string): Uint8Array;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { stringToUtf8Array as t };
|
|
11
|
+
//# sourceMappingURL=string-to-utf8-array-DcnUcijD.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-to-utf8-array-DcnUcijD.d.cts","names":[],"sources":["../src/string-to-utf8-array.ts"],"sourcesContent":[],"mappings":";;AA0BA;;;;;iBAAgB,iBAAA,iBAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=new TextEncoder;function t(t){return e.encode(t)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.stringToUtf8Array = stringToUtf8Array;
|
|
7
|
-
const r = new TextEncoder();
|
|
8
|
-
function stringToUtf8Array(n) {
|
|
9
|
-
return r.encode(n);
|
|
10
|
-
}
|
|
1
|
+
const e=require(`./string-to-utf8-array-DzjMX8ba.cjs`);exports.stringToUtf8Array=e.t;
|