@stryke/convert 0.6.24 → 0.6.25

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.
Files changed (209) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/array-buffer-to-string.cjs +1 -1
  3. package/dist/array-buffer-to-string.d.cts +11 -2
  4. package/dist/array-buffer-to-string.d.cts.map +1 -0
  5. package/dist/array-buffer-to-string.d.mts +11 -2
  6. package/dist/array-buffer-to-string.d.mts.map +1 -0
  7. package/dist/array-buffer-to-string.mjs +2 -1
  8. package/dist/array-buffer-to-string.mjs.map +1 -0
  9. package/dist/buffer-to-string.cjs +1 -1
  10. package/dist/buffer-to-string.d.cts +14 -2
  11. package/dist/buffer-to-string.d.cts.map +1 -0
  12. package/dist/buffer-to-string.d.mts +14 -2
  13. package/dist/buffer-to-string.d.mts.map +1 -0
  14. package/dist/buffer-to-string.mjs +2 -1
  15. package/dist/buffer-to-string.mjs.map +1 -0
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.cts +11 -11
  18. package/dist/index.d.mts +11 -11
  19. package/dist/index.mjs +1 -1
  20. package/dist/neutral.cjs +1 -1
  21. package/dist/neutral.d.cts +9 -9
  22. package/dist/neutral.d.mts +9 -9
  23. package/dist/neutral.mjs +1 -1
  24. package/dist/parse-type-definition.cjs +1 -1
  25. package/dist/parse-type-definition.d.cts +14 -2
  26. package/dist/parse-type-definition.d.cts.map +1 -0
  27. package/dist/parse-type-definition.d.mts +14 -2
  28. package/dist/parse-type-definition.d.mts.map +1 -0
  29. package/dist/parse-type-definition.mjs +2 -1
  30. package/dist/parse-type-definition.mjs.map +1 -0
  31. package/dist/string-to-buffer.cjs +1 -1
  32. package/dist/string-to-buffer.d.cts +26 -2
  33. package/dist/string-to-buffer.d.cts.map +1 -0
  34. package/dist/string-to-buffer.d.mts +26 -2
  35. package/dist/string-to-buffer.d.mts.map +1 -0
  36. package/dist/string-to-buffer.mjs +2 -1
  37. package/dist/string-to-buffer.mjs.map +1 -0
  38. package/dist/string-to-uint8-array.cjs +1 -1
  39. package/dist/string-to-uint8-array.d.cts +25 -2
  40. package/dist/string-to-uint8-array.d.cts.map +1 -0
  41. package/dist/string-to-uint8-array.d.mts +25 -2
  42. package/dist/string-to-uint8-array.d.mts.map +1 -0
  43. package/dist/string-to-uint8-array.mjs +2 -1
  44. package/dist/string-to-uint8-array.mjs.map +1 -0
  45. package/dist/string-to-utf8-array.cjs +1 -1
  46. package/dist/string-to-utf8-array.d.cts +11 -2
  47. package/dist/string-to-utf8-array.d.cts.map +1 -0
  48. package/dist/string-to-utf8-array.d.mts +11 -2
  49. package/dist/string-to-utf8-array.d.mts.map +1 -0
  50. package/dist/string-to-utf8-array.mjs +2 -1
  51. package/dist/string-to-utf8-array.mjs.map +1 -0
  52. package/dist/to-array.cjs +1 -1
  53. package/dist/to-array.d.cts +15 -2
  54. package/dist/to-array.d.cts.map +1 -0
  55. package/dist/to-array.d.mts +15 -2
  56. package/dist/to-array.d.mts.map +1 -0
  57. package/dist/to-array.mjs +2 -1
  58. package/dist/to-array.mjs.map +1 -0
  59. package/dist/to-string-key.cjs +1 -1
  60. package/dist/to-string-key.d.cts +11 -2
  61. package/dist/to-string-key.d.cts.map +1 -0
  62. package/dist/to-string-key.d.mts +11 -2
  63. package/dist/to-string-key.d.mts.map +1 -0
  64. package/dist/to-string-key.mjs +2 -1
  65. package/dist/to-string-key.mjs.map +1 -0
  66. package/dist/type-checks/src/get-object-tag.cjs +1 -0
  67. package/dist/type-checks/src/get-object-tag.mjs +2 -0
  68. package/dist/{string-to-utf8-array-BiFS1qOV.mjs.map → type-checks/src/get-object-tag.mjs.map} +1 -1
  69. package/dist/type-checks/src/index.cjs +1 -0
  70. package/dist/type-checks/src/index.mjs +1 -0
  71. package/dist/type-checks/src/is-buffer.cjs +1 -0
  72. package/dist/type-checks/src/is-buffer.mjs +2 -0
  73. package/dist/type-checks/src/is-buffer.mjs.map +1 -0
  74. package/dist/type-checks/src/is-collection.cjs +1 -0
  75. package/dist/type-checks/src/is-collection.mjs +1 -0
  76. package/dist/type-checks/src/is-object.cjs +1 -0
  77. package/dist/type-checks/src/is-object.mjs +2 -0
  78. package/dist/type-checks/src/is-object.mjs.map +1 -0
  79. package/dist/type-checks/src/is-plain-object.cjs +1 -0
  80. package/dist/type-checks/src/is-plain-object.mjs +2 -0
  81. package/dist/type-checks/src/is-plain-object.mjs.map +1 -0
  82. package/dist/type-checks/src/is-string.cjs +1 -0
  83. package/dist/type-checks/src/is-string.mjs +2 -0
  84. package/dist/type-checks/src/is-string.mjs.map +1 -0
  85. package/dist/type-checks/src/type-detect.cjs +1 -0
  86. package/dist/type-checks/src/type-detect.mjs +2 -0
  87. package/dist/type-checks/src/type-detect.mjs.map +1 -0
  88. package/dist/types/src/array.d.cts +8 -0
  89. package/dist/types/src/array.d.cts.map +1 -0
  90. package/dist/types/src/array.d.mts +8 -0
  91. package/dist/types/src/array.d.mts.map +1 -0
  92. package/dist/{parse-type-definition-C6ppBfCe.d.mts → types/src/configuration.d.cts} +2 -11
  93. package/dist/types/src/configuration.d.cts.map +1 -0
  94. package/dist/{parse-type-definition-WznwYsLX.d.cts → types/src/configuration.d.mts} +2 -11
  95. package/dist/types/src/configuration.d.mts.map +1 -0
  96. package/dist/types/src/utilities.d.cts +5 -0
  97. package/dist/types/src/utilities.d.cts.map +1 -0
  98. package/dist/types/src/utilities.d.mts +5 -0
  99. package/dist/types/src/utilities.d.mts.map +1 -0
  100. package/dist/uint8-array-to-stream.cjs +1 -1
  101. package/dist/uint8-array-to-stream.d.cts +25 -2
  102. package/dist/uint8-array-to-stream.d.cts.map +1 -0
  103. package/dist/uint8-array-to-stream.d.mts +25 -2
  104. package/dist/uint8-array-to-stream.d.mts.map +1 -0
  105. package/dist/uint8-array-to-stream.mjs +2 -1
  106. package/dist/uint8-array-to-stream.mjs.map +1 -0
  107. package/dist/uint8-array-to-string.cjs +1 -1
  108. package/dist/uint8-array-to-string.d.cts +11 -2
  109. package/dist/uint8-array-to-string.d.cts.map +1 -0
  110. package/dist/uint8-array-to-string.d.mts +11 -2
  111. package/dist/uint8-array-to-string.d.mts.map +1 -0
  112. package/dist/uint8-array-to-string.mjs +2 -1
  113. package/dist/uint8-array-to-string.mjs.map +1 -0
  114. package/dist/uint8-array-to-string.node.cjs +1 -1
  115. package/dist/uint8-array-to-string.node.d.cts +14 -2
  116. package/dist/uint8-array-to-string.node.d.cts.map +1 -0
  117. package/dist/uint8-array-to-string.node.d.mts +14 -2
  118. package/dist/uint8-array-to-string.node.d.mts.map +1 -0
  119. package/dist/uint8-array-to-string.node.mjs +2 -1
  120. package/dist/uint8-array-to-string.node.mjs.map +1 -0
  121. package/dist/utf8-array-to-string.cjs +1 -1
  122. package/dist/utf8-array-to-string.d.cts +11 -2
  123. package/dist/utf8-array-to-string.d.cts.map +1 -0
  124. package/dist/utf8-array-to-string.d.mts +11 -2
  125. package/dist/utf8-array-to-string.d.mts.map +1 -0
  126. package/dist/utf8-array-to-string.mjs +2 -1
  127. package/dist/utf8-array-to-string.mjs.map +1 -0
  128. package/package.json +3 -3
  129. package/dist/array-buffer-to-string-C11aVDDi.cjs +0 -1
  130. package/dist/array-buffer-to-string-Ck1wKcim.mjs +0 -2
  131. package/dist/array-buffer-to-string-Ck1wKcim.mjs.map +0 -1
  132. package/dist/array-buffer-to-string-CyitIedv.d.cts +0 -11
  133. package/dist/array-buffer-to-string-CyitIedv.d.cts.map +0 -1
  134. package/dist/array-buffer-to-string-DeEBcG3B.d.mts +0 -11
  135. package/dist/array-buffer-to-string-DeEBcG3B.d.mts.map +0 -1
  136. package/dist/buffer-to-string-BM0gdjtH.d.cts +0 -14
  137. package/dist/buffer-to-string-BM0gdjtH.d.cts.map +0 -1
  138. package/dist/buffer-to-string-C5uu2I9v.cjs +0 -1
  139. package/dist/buffer-to-string-DOBdYQzE.mjs +0 -2
  140. package/dist/buffer-to-string-DOBdYQzE.mjs.map +0 -1
  141. package/dist/buffer-to-string-KwWDaeXZ.d.mts +0 -14
  142. package/dist/buffer-to-string-KwWDaeXZ.d.mts.map +0 -1
  143. package/dist/parse-type-definition-2UeRPhOv.mjs +0 -2
  144. package/dist/parse-type-definition-2UeRPhOv.mjs.map +0 -1
  145. package/dist/parse-type-definition-C6ppBfCe.d.mts.map +0 -1
  146. package/dist/parse-type-definition-WznwYsLX.d.cts.map +0 -1
  147. package/dist/parse-type-definition-tN_XNvw2.cjs +0 -1
  148. package/dist/string-to-buffer-Ct8hX_gT.d.mts +0 -26
  149. package/dist/string-to-buffer-Ct8hX_gT.d.mts.map +0 -1
  150. package/dist/string-to-buffer-DT1hmd7E.cjs +0 -1
  151. package/dist/string-to-buffer-DWEJ2oBO.mjs +0 -2
  152. package/dist/string-to-buffer-DWEJ2oBO.mjs.map +0 -1
  153. package/dist/string-to-buffer-DgvrLU6Z.d.cts +0 -26
  154. package/dist/string-to-buffer-DgvrLU6Z.d.cts.map +0 -1
  155. package/dist/string-to-uint8-array-1nnn75lE.cjs +0 -1
  156. package/dist/string-to-uint8-array-Bemw-wC0.d.mts +0 -25
  157. package/dist/string-to-uint8-array-Bemw-wC0.d.mts.map +0 -1
  158. package/dist/string-to-uint8-array-BuyABRFc.d.cts +0 -25
  159. package/dist/string-to-uint8-array-BuyABRFc.d.cts.map +0 -1
  160. package/dist/string-to-uint8-array-Cp8Uy9Dd.mjs +0 -2
  161. package/dist/string-to-uint8-array-Cp8Uy9Dd.mjs.map +0 -1
  162. package/dist/string-to-utf8-array-BiFS1qOV.mjs +0 -2
  163. package/dist/string-to-utf8-array-D5Ej2ODQ.d.mts +0 -11
  164. package/dist/string-to-utf8-array-D5Ej2ODQ.d.mts.map +0 -1
  165. package/dist/string-to-utf8-array-DcnUcijD.d.cts +0 -11
  166. package/dist/string-to-utf8-array-DcnUcijD.d.cts.map +0 -1
  167. package/dist/string-to-utf8-array-DzjMX8ba.cjs +0 -1
  168. package/dist/to-array-B5vdSOyE.d.mts +0 -20
  169. package/dist/to-array-B5vdSOyE.d.mts.map +0 -1
  170. package/dist/to-array-DypOORLR.mjs +0 -2
  171. package/dist/to-array-DypOORLR.mjs.map +0 -1
  172. package/dist/to-array-hovilP39.d.cts +0 -20
  173. package/dist/to-array-hovilP39.d.cts.map +0 -1
  174. package/dist/to-array-lsJQeHmC.cjs +0 -1
  175. package/dist/to-string-key-AETeEmqn.cjs +0 -1
  176. package/dist/to-string-key-BPU8Yayu.mjs +0 -2
  177. package/dist/to-string-key-BPU8Yayu.mjs.map +0 -1
  178. package/dist/to-string-key-BsJi969H.d.cts +0 -11
  179. package/dist/to-string-key-BsJi969H.d.cts.map +0 -1
  180. package/dist/to-string-key-DepSNY9f.d.mts +0 -11
  181. package/dist/to-string-key-DepSNY9f.d.mts.map +0 -1
  182. package/dist/uint8-array-to-stream-C9Mja3TP.d.cts +0 -25
  183. package/dist/uint8-array-to-stream-C9Mja3TP.d.cts.map +0 -1
  184. package/dist/uint8-array-to-stream-Cihhs2sR.cjs +0 -1
  185. package/dist/uint8-array-to-stream-DTph8RAX.mjs +0 -2
  186. package/dist/uint8-array-to-stream-DTph8RAX.mjs.map +0 -1
  187. package/dist/uint8-array-to-stream-gy0Q2EoT.d.mts +0 -25
  188. package/dist/uint8-array-to-stream-gy0Q2EoT.d.mts.map +0 -1
  189. package/dist/uint8-array-to-string-B1OAtvJr.d.cts +0 -11
  190. package/dist/uint8-array-to-string-B1OAtvJr.d.cts.map +0 -1
  191. package/dist/uint8-array-to-string-CQvEdtuI.mjs +0 -2
  192. package/dist/uint8-array-to-string-CQvEdtuI.mjs.map +0 -1
  193. package/dist/uint8-array-to-string-CjA1fEXC.d.mts +0 -11
  194. package/dist/uint8-array-to-string-CjA1fEXC.d.mts.map +0 -1
  195. package/dist/uint8-array-to-string-CmUiFDa1.cjs +0 -1
  196. package/dist/uint8-array-to-string.node-BEp4mxNL.d.mts +0 -14
  197. package/dist/uint8-array-to-string.node-BEp4mxNL.d.mts.map +0 -1
  198. package/dist/uint8-array-to-string.node-DAjOixF7.d.cts +0 -14
  199. package/dist/uint8-array-to-string.node-DAjOixF7.d.cts.map +0 -1
  200. package/dist/uint8-array-to-string.node-nB1JhZqQ.cjs +0 -1
  201. package/dist/uint8-array-to-string.node-t7NS2Zmo.mjs +0 -2
  202. package/dist/uint8-array-to-string.node-t7NS2Zmo.mjs.map +0 -1
  203. package/dist/utf8-array-to-string-BiFD671-.d.cts +0 -11
  204. package/dist/utf8-array-to-string-BiFD671-.d.cts.map +0 -1
  205. package/dist/utf8-array-to-string-Brda-b96.d.mts +0 -11
  206. package/dist/utf8-array-to-string-Brda-b96.d.mts.map +0 -1
  207. package/dist/utf8-array-to-string-D96sN_nr.mjs +0 -2
  208. package/dist/utf8-array-to-string-D96sN_nr.mjs.map +0 -1
  209. package/dist/utf8-array-to-string-lutucTzo.cjs +0 -1
@@ -1,11 +0,0 @@
1
- //#region src/array-buffer-to-string.d.ts
2
- /**
3
- * Convert an ArrayBuffer or Uint8Array to a string
4
- *
5
- * @param buffer - The ArrayBuffer or Uint8Array to convert
6
- * @returns The converted string
7
- */
8
- declare function arrayBufferToString(buffer: ArrayBuffer | ArrayBufferLike | Uint8Array): string;
9
- //#endregion
10
- export { arrayBufferToString as t };
11
- //# sourceMappingURL=array-buffer-to-string-DeEBcG3B.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array-buffer-to-string-DeEBcG3B.d.mts","names":[],"sources":["../src/array-buffer-to-string.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;iBAAgB,mBAAA,SACN,cAAc,kBAAkB"}
@@ -1,14 +0,0 @@
1
- import { Buffer } from "node:buffer";
2
-
3
- //#region src/buffer-to-string.d.ts
4
-
5
- /**
6
- * Converts a buffer to a string.
7
- *
8
- * @param buf - The buffer to convert.
9
- * @returns The converted string.
10
- */
11
- declare function bufferToString(buf: Buffer | string): string;
12
- //#endregion
13
- export { bufferToString as t };
14
- //# sourceMappingURL=buffer-to-string-BM0gdjtH.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer-to-string-BM0gdjtH.d.cts","names":[],"sources":["../src/buffer-to-string.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,cAAA,MAAoB"}
@@ -1 +0,0 @@
1
- function e(e){return e.toString(`utf8`)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,2 +0,0 @@
1
- function e(e){return e.toString(`utf8`)}export{e as t};
2
- //# sourceMappingURL=buffer-to-string-DOBdYQzE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer-to-string-DOBdYQzE.mjs","names":[],"sources":["../src/buffer-to-string.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 type { Buffer } from \"node:buffer\";\n\n/**\n * Converts a buffer to a string.\n *\n * @param buf - The buffer to convert.\n * @returns The converted string.\n */\nexport function bufferToString(buf: Buffer | string): string {\n return buf.toString(\"utf8\");\n}\n"],"mappings":"AA0BA,SAAgB,EAAe,EAA8B,CAC3D,OAAO,EAAI,SAAS,OAAO"}
@@ -1,14 +0,0 @@
1
- import { Buffer } from "node:buffer";
2
-
3
- //#region src/buffer-to-string.d.ts
4
-
5
- /**
6
- * Converts a buffer to a string.
7
- *
8
- * @param buf - The buffer to convert.
9
- * @returns The converted string.
10
- */
11
- declare function bufferToString(buf: Buffer | string): string;
12
- //#endregion
13
- export { bufferToString as t };
14
- //# sourceMappingURL=buffer-to-string-KwWDaeXZ.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer-to-string-KwWDaeXZ.d.mts","names":[],"sources":["../src/buffer-to-string.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,cAAA,MAAoB"}
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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,26 +0,0 @@
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-Ct8hX_gT.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string-to-buffer-Ct8hX_gT.d.mts","names":[],"sources":["../src/string-to-buffer.ts"],"sourcesContent":[],"mappings":";;;;;;AAsCA;;;;;;;;;;;;;;;;iBAAgB,cAAA,eAA6B"}
@@ -1 +0,0 @@
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}});
@@ -1,2 +0,0 @@
1
- import{Buffer as e}from"node:buffer";function t(t){return e.from(t,`utf8`)}export{t};
2
- //# sourceMappingURL=string-to-buffer-DWEJ2oBO.mjs.map
@@ -1 +0,0 @@
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"}
@@ -1,26 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"string-to-buffer-DgvrLU6Z.d.cts","names":[],"sources":["../src/string-to-buffer.ts"],"sourcesContent":[],"mappings":";;;;;;AAsCA;;;;;;;;;;;;;;;;iBAAgB,cAAA,eAA6B"}
@@ -1 +0,0 @@
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}});
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
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,2 +0,0 @@
1
- const e=new TextEncoder;function t(t){return e.encode(t)}export{t};
2
- //# sourceMappingURL=string-to-utf8-array-BiFS1qOV.mjs.map
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- const e=new TextEncoder;function t(t){return e.encode(t)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,20 +0,0 @@
1
- //#region ../types/src/array.d.ts
2
- /**
3
- * Matches any array or array-like object.
4
- */
5
- type Arrayable<T> = T | T[];
6
- //#endregion
7
- //#region ../types/src/utilities.d.ts
8
- type Nullable<T> = T | null;
9
- //#endregion
10
- //#region src/to-array.d.ts
11
- /**
12
- * Convert `Arrayable<T>` to `Array<T>`
13
- *
14
- * @param array - The `Arrayable<T>` to convert
15
- * @returns An `Array<T>` containing the elements of the input
16
- */
17
- declare function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T>;
18
- //#endregion
19
- export { toArray as t };
20
- //# sourceMappingURL=to-array-B5vdSOyE.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-array-B5vdSOyE.d.mts","names":[],"sources":["../../types/src/array.ts","../../types/src/utilities.ts","../src/to-array.ts"],"sourcesContent":[],"mappings":";;AAqBA;;KAAY,eAAe,IAAI;;;AAAnB,KCDA,QDCS,CAAA,CAAA,CAAA,GCDK,CDCL,GAAM,IAAK;;;;;;ACDhC;;;iBCOgB,mBAAmB,SAAS,UAAU,MAAM,MAAM"}
@@ -1,2 +0,0 @@
1
- function e(e){return e??=[],Array.isArray(e)?e:[e]}export{e as t};
2
- //# sourceMappingURL=to-array-DypOORLR.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-array-DypOORLR.mjs","names":[],"sources":["../src/to-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\nimport type { Arrayable } from \"@stryke/types/array\";\nimport type { Nullable } from \"@stryke/types/utilities\";\n\n/**\n * Convert `Arrayable<T>` to `Array<T>`\n *\n * @param array - The `Arrayable<T>` to convert\n * @returns An `Array<T>` containing the elements of the input\n */\nexport function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T> {\n array = array ?? [];\n return Array.isArray(array) ? array : [array];\n}\n"],"mappings":"AA2BA,SAAgB,EAAW,EAA0C,CAEnE,MADA,KAAiB,EAAE,CACZ,MAAM,QAAQ,EAAM,CAAG,EAAQ,CAAC,EAAM"}
@@ -1,20 +0,0 @@
1
- //#region ../types/src/array.d.ts
2
- /**
3
- * Matches any array or array-like object.
4
- */
5
- type Arrayable<T> = T | T[];
6
- //#endregion
7
- //#region ../types/src/utilities.d.ts
8
- type Nullable<T> = T | null;
9
- //#endregion
10
- //#region src/to-array.d.ts
11
- /**
12
- * Convert `Arrayable<T>` to `Array<T>`
13
- *
14
- * @param array - The `Arrayable<T>` to convert
15
- * @returns An `Array<T>` containing the elements of the input
16
- */
17
- declare function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T>;
18
- //#endregion
19
- export { toArray as t };
20
- //# sourceMappingURL=to-array-hovilP39.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-array-hovilP39.d.cts","names":[],"sources":["../../types/src/array.ts","../../types/src/utilities.ts","../src/to-array.ts"],"sourcesContent":[],"mappings":";;AAqBA;;KAAY,eAAe,IAAI;;;AAAnB,KCDA,QDCS,CAAA,CAAA,CAAA,GCDK,CDCL,GAAM,IAAK;;;;;;ACDhC;;;iBCOgB,mBAAmB,SAAS,UAAU,MAAM,MAAM"}
@@ -1 +0,0 @@
1
- function e(e){return e??=[],Array.isArray(e)?e:[e]}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1 +0,0 @@
1
- function e(e){return Object.is(e,-0)?`-0`:e.toString()}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,2 +0,0 @@
1
- function e(e){return Object.is(e,-0)?`-0`:e.toString()}export{e as t};
2
- //# sourceMappingURL=to-string-key-BPU8Yayu.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-string-key-BPU8Yayu.mjs","names":[],"sources":["../src/to-string-key.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 * Converts `value` to a string key if it's not a string or symbol.\n *\n * @param value - The value to inspect.\n * @returns Returns the key.\n */\nexport function toStringKey(value: number): string | symbol {\n if (Object.is(value, -0)) {\n return \"-0\";\n }\n\n return value.toString();\n}\n"],"mappings":"AAwBA,SAAgB,EAAY,EAAgC,CAK1D,OAJI,OAAO,GAAG,EAAO,GAAG,CACf,KAGF,EAAM,UAAU"}
@@ -1,11 +0,0 @@
1
- //#region src/to-string-key.d.ts
2
- /**
3
- * Converts `value` to a string key if it's not a string or symbol.
4
- *
5
- * @param value - The value to inspect.
6
- * @returns Returns the key.
7
- */
8
- declare function toStringKey(value: number): string | symbol;
9
- //#endregion
10
- export { toStringKey as t };
11
- //# sourceMappingURL=to-string-key-BsJi969H.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-string-key-BsJi969H.d.cts","names":[],"sources":["../src/to-string-key.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;iBAAgB,WAAA"}
@@ -1,11 +0,0 @@
1
- //#region src/to-string-key.d.ts
2
- /**
3
- * Converts `value` to a string key if it's not a string or symbol.
4
- *
5
- * @param value - The value to inspect.
6
- * @returns Returns the key.
7
- */
8
- declare function toStringKey(value: number): string | symbol;
9
- //#endregion
10
- export { toStringKey as t };
11
- //# sourceMappingURL=to-string-key-DepSNY9f.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-string-key-DepSNY9f.d.mts","names":[],"sources":["../src/to-string-key.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;iBAAgB,WAAA"}
@@ -1,25 +0,0 @@
1
- //#region src/uint8-array-to-stream.d.ts
2
- /**
3
- * Convert a Uint8Array to a ReadableStream
4
- *
5
- * @param data - The Uint8Array to convert
6
- * @returns The converted ReadableStream
7
- */
8
- declare function uint8ArrayToStream(data: Uint8Array): ReadableStream<Uint8Array>;
9
- /**
10
- * Concatenate an array of Uint8Array chunks into a single Uint8Array
11
- *
12
- * @param chunks - Array of Uint8Array chunks to concatenate
13
- * @returns The concatenated Uint8Array
14
- */
15
- declare function concatUint8Array(chunks: Uint8Array[]): Uint8Array;
16
- /**
17
- * Concatenate a ReadableStream of Uint8Array chunks into a single Uint8Array
18
- *
19
- * @param stream - The ReadableStream of Uint8Array chunks to concatenate
20
- * @returns A promise that resolves to the concatenated Uint8Array
21
- */
22
- declare function concatUint8ArrayStream(stream: ReadableStream<Uint8Array>): Promise<Uint8Array>;
23
- //#endregion
24
- export { concatUint8ArrayStream as n, uint8ArrayToStream as r, concatUint8Array as t };
25
- //# sourceMappingURL=uint8-array-to-stream-C9Mja3TP.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-stream-C9Mja3TP.d.cts","names":[],"sources":["../src/uint8-array-to-stream.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;AAiBgB,iBAjBA,kBAAA,CAiByB,IAAe,EAhBhD,UAgB0D,CAAA,EAf/D,cAe+D,CAfhD,UAegD,CAAA;AAoBlE;;;;;;iBApBgB,gBAAA,SAAyB,eAAe;;;;;;;iBAoBlC,sBAAA,SACZ,eAAe,cACtB,QAAQ"}
@@ -1 +0,0 @@
1
- function e(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}function t(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}async function n(e){let n=[];return await e.pipeTo(new WritableStream({write(e){n.push(e)}})),t(n)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,2 +0,0 @@
1
- function e(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}function t(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}async function n(e){let n=[];return await e.pipeTo(new WritableStream({write(e){n.push(e)}})),t(n)}export{n,e as r,t};
2
- //# sourceMappingURL=uint8-array-to-stream-DTph8RAX.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-stream-DTph8RAX.mjs","names":["chunks: Uint8Array[]"],"sources":["../src/uint8-array-to-stream.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 Uint8Array to a ReadableStream\n *\n * @param data - The Uint8Array to convert\n * @returns The converted ReadableStream\n */\nexport function uint8ArrayToStream(\n data: Uint8Array\n): ReadableStream<Uint8Array> {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(data);\n controller.close();\n }\n });\n}\n\n/**\n * Concatenate an array of Uint8Array chunks into a single Uint8Array\n *\n * @param chunks - Array of Uint8Array chunks to concatenate\n * @returns The concatenated Uint8Array\n */\nexport function concatUint8Array(chunks: Uint8Array[]): Uint8Array {\n let total = 0;\n for (const chunk of chunks) {\n total += chunk.length;\n }\n const result = new Uint8Array(total);\n let offset = 0;\n for (const chunk of chunks) {\n result.set(chunk, offset);\n offset += chunk.length;\n }\n return result;\n}\n\n/**\n * Concatenate a ReadableStream of Uint8Array chunks into a single Uint8Array\n *\n * @param stream - The ReadableStream of Uint8Array chunks to concatenate\n * @returns A promise that resolves to the concatenated Uint8Array\n */\nexport async function concatUint8ArrayStream(\n stream: ReadableStream<Uint8Array>\n): Promise<Uint8Array> {\n const chunks: Uint8Array[] = [];\n await stream.pipeTo(\n new WritableStream({\n write(chunk) {\n chunks.push(chunk);\n }\n })\n );\n\n return concatUint8Array(chunks);\n}\n"],"mappings":"AAwBA,SAAgB,EACd,EAC4B,CAC5B,OAAO,IAAI,eAAe,CACxB,MAAM,EAAY,CAChB,EAAW,QAAQ,EAAK,CACxB,EAAW,OAAO,EAErB,CAAC,CASJ,SAAgB,EAAiB,EAAkC,CACjE,IAAI,EAAQ,EACZ,IAAK,IAAM,KAAS,EAClB,GAAS,EAAM,OAEjB,IAAM,EAAS,IAAI,WAAW,EAAM,CAChC,EAAS,EACb,IAAK,IAAM,KAAS,EAClB,EAAO,IAAI,EAAO,EAAO,CACzB,GAAU,EAAM,OAElB,OAAO,EAST,eAAsB,EACpB,EACqB,CACrB,IAAMA,EAAuB,EAAE,CAS/B,OARA,MAAM,EAAO,OACX,IAAI,eAAe,CACjB,MAAM,EAAO,CACX,EAAO,KAAK,EAAM,EAErB,CAAC,CACH,CAEM,EAAiB,EAAO"}
@@ -1,25 +0,0 @@
1
- //#region src/uint8-array-to-stream.d.ts
2
- /**
3
- * Convert a Uint8Array to a ReadableStream
4
- *
5
- * @param data - The Uint8Array to convert
6
- * @returns The converted ReadableStream
7
- */
8
- declare function uint8ArrayToStream(data: Uint8Array): ReadableStream<Uint8Array>;
9
- /**
10
- * Concatenate an array of Uint8Array chunks into a single Uint8Array
11
- *
12
- * @param chunks - Array of Uint8Array chunks to concatenate
13
- * @returns The concatenated Uint8Array
14
- */
15
- declare function concatUint8Array(chunks: Uint8Array[]): Uint8Array;
16
- /**
17
- * Concatenate a ReadableStream of Uint8Array chunks into a single Uint8Array
18
- *
19
- * @param stream - The ReadableStream of Uint8Array chunks to concatenate
20
- * @returns A promise that resolves to the concatenated Uint8Array
21
- */
22
- declare function concatUint8ArrayStream(stream: ReadableStream<Uint8Array>): Promise<Uint8Array>;
23
- //#endregion
24
- export { concatUint8ArrayStream as n, uint8ArrayToStream as r, concatUint8Array as t };
25
- //# sourceMappingURL=uint8-array-to-stream-gy0Q2EoT.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-stream-gy0Q2EoT.d.mts","names":[],"sources":["../src/uint8-array-to-stream.ts"],"sourcesContent":[],"mappings":";;AAwBA;;;;;AAiBgB,iBAjBA,kBAAA,CAiByB,IAAe,EAhBhD,UAgB0D,CAAA,EAf/D,cAe+D,CAfhD,UAegD,CAAA;AAoBlE;;;;;;iBApBgB,gBAAA,SAAyB,eAAe;;;;;;;iBAoBlC,sBAAA,SACZ,eAAe,cACtB,QAAQ"}
@@ -1,11 +0,0 @@
1
- //#region src/uint8-array-to-string.d.ts
2
- /**
3
- * Convert a Uint8Array to a base64 string
4
- *
5
- * @param buffer - The Uint8Array to convert
6
- * @returns The converted base64 string
7
- */
8
- declare function uint8ArrayToString(buffer: Uint8Array): string;
9
- //#endregion
10
- export { uint8ArrayToString as t };
11
- //# sourceMappingURL=uint8-array-to-string-B1OAtvJr.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-string-B1OAtvJr.d.cts","names":[],"sources":["../src/uint8-array-to-string.ts"],"sourcesContent":[],"mappings":";;AA0BA;;;;;iBAAgB,kBAAA,SAA2B"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./array-buffer-to-string-Ck1wKcim.mjs";function t(t){return btoa(e(t))}export{t};
2
- //# sourceMappingURL=uint8-array-to-string-CQvEdtuI.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-string-CQvEdtuI.mjs","names":[],"sources":["../src/uint8-array-to-string.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 { arrayBufferToString } from \"./array-buffer-to-string\";\n\n/**\n * Convert a Uint8Array to a base64 string\n *\n * @param buffer - The Uint8Array to convert\n * @returns The converted base64 string\n */\nexport function uint8ArrayToString(buffer: Uint8Array): string {\n return btoa(arrayBufferToString(buffer));\n}\n"],"mappings":"0DA0BA,SAAgB,EAAmB,EAA4B,CAC7D,OAAO,KAAK,EAAoB,EAAO,CAAC"}
@@ -1,11 +0,0 @@
1
- //#region src/uint8-array-to-string.d.ts
2
- /**
3
- * Convert a Uint8Array to a base64 string
4
- *
5
- * @param buffer - The Uint8Array to convert
6
- * @returns The converted base64 string
7
- */
8
- declare function uint8ArrayToString(buffer: Uint8Array): string;
9
- //#endregion
10
- export { uint8ArrayToString as t };
11
- //# sourceMappingURL=uint8-array-to-string-CjA1fEXC.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-string-CjA1fEXC.d.mts","names":[],"sources":["../src/uint8-array-to-string.ts"],"sourcesContent":[],"mappings":";;AA0BA;;;;;iBAAgB,kBAAA,SAA2B"}
@@ -1 +0,0 @@
1
- const e=require(`./array-buffer-to-string-C11aVDDi.cjs`);function t(t){return btoa(e.t(t))}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,14 +0,0 @@
1
- //#region src/uint8-array-to-string.node.d.ts
2
- /**
3
- * Convert a Uint8Array array to string
4
- *
5
- * @see https://stackoverflow.com/a/41798356/1465919
6
- * @see https://stackoverflow.com/a/36949791/1465919
7
- *
8
- * @param arr - Uint8Array to convert
9
- * @returns The converted string
10
- */
11
- declare const uint8ArrayToString: (arr: Uint8Array) => string;
12
- //#endregion
13
- export { uint8ArrayToString as t };
14
- //# sourceMappingURL=uint8-array-to-string.node-BEp4mxNL.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-string.node-BEp4mxNL.d.mts","names":[],"sources":["../src/uint8-array-to-string.node.ts"],"sourcesContent":[],"mappings":";;AA6BA;;;;;;;;cAAa,0BAA2B"}
@@ -1,14 +0,0 @@
1
- //#region src/uint8-array-to-string.node.d.ts
2
- /**
3
- * Convert a Uint8Array array to string
4
- *
5
- * @see https://stackoverflow.com/a/41798356/1465919
6
- * @see https://stackoverflow.com/a/36949791/1465919
7
- *
8
- * @param arr - Uint8Array to convert
9
- * @returns The converted string
10
- */
11
- declare const uint8ArrayToString: (arr: Uint8Array) => string;
12
- //#endregion
13
- export { uint8ArrayToString as t };
14
- //# sourceMappingURL=uint8-array-to-string.node-DAjOixF7.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uint8-array-to-string.node-DAjOixF7.d.cts","names":[],"sources":["../src/uint8-array-to-string.node.ts"],"sourcesContent":[],"mappings":";;AA6BA;;;;;;;;cAAa,0BAA2B"}