@stryke/hash 0.12.26 → 0.12.28

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 (149) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/_virtual/rolldown_runtime.cjs +1 -0
  3. package/dist/convert/src/array-buffer-to-string.cjs +1 -0
  4. package/dist/convert/src/array-buffer-to-string.mjs +2 -0
  5. package/dist/convert/src/array-buffer-to-string.mjs.map +1 -0
  6. package/dist/convert/src/neutral.cjs +1 -0
  7. package/dist/convert/src/neutral.mjs +1 -0
  8. package/dist/convert/src/parse-type-definition.cjs +1 -0
  9. package/dist/convert/src/parse-type-definition.mjs +1 -0
  10. package/dist/convert/src/string-to-uint8-array.cjs +1 -0
  11. package/dist/convert/src/string-to-uint8-array.mjs +2 -0
  12. package/dist/convert/src/string-to-uint8-array.mjs.map +1 -0
  13. package/dist/convert/src/string-to-utf8-array.cjs +1 -0
  14. package/dist/convert/src/string-to-utf8-array.mjs +2 -0
  15. package/dist/convert/src/string-to-utf8-array.mjs.map +1 -0
  16. package/dist/convert/src/utf8-array-to-string.cjs +1 -0
  17. package/dist/convert/src/utf8-array-to-string.mjs +2 -0
  18. package/dist/convert/src/utf8-array-to-string.mjs.map +1 -0
  19. package/dist/digest.cjs +1 -1
  20. package/dist/digest.d.cts +32 -2
  21. package/dist/digest.d.cts.map +1 -0
  22. package/dist/digest.d.mts +32 -2
  23. package/dist/digest.d.mts.map +1 -0
  24. package/dist/digest.mjs +2 -1
  25. package/dist/digest.mjs.map +1 -0
  26. package/dist/etag.cjs +1 -1
  27. package/dist/etag.d.cts +22 -2
  28. package/dist/etag.d.cts.map +1 -0
  29. package/dist/etag.d.mts +22 -2
  30. package/dist/etag.d.mts.map +1 -0
  31. package/dist/etag.mjs +2 -1
  32. package/dist/etag.mjs.map +1 -0
  33. package/dist/fs/src/list-files.cjs +1 -0
  34. package/dist/fs/src/list-files.d.cts +7 -0
  35. package/dist/fs/src/list-files.d.cts.map +1 -0
  36. package/dist/fs/src/list-files.d.mts +7 -0
  37. package/dist/fs/src/list-files.d.mts.map +1 -0
  38. package/dist/fs/src/list-files.mjs +2 -0
  39. package/dist/fs/src/list-files.mjs.map +1 -0
  40. package/dist/fs/src/read-file.cjs +1 -0
  41. package/dist/fs/src/read-file.mjs +2 -0
  42. package/dist/fs/src/read-file.mjs.map +1 -0
  43. package/dist/hash-files.cjs +1 -1
  44. package/dist/hash-files.d.cts +24 -2
  45. package/dist/hash-files.d.cts.map +1 -0
  46. package/dist/hash-files.d.mts +24 -2
  47. package/dist/hash-files.d.mts.map +1 -0
  48. package/dist/hash-files.mjs +2 -1
  49. package/dist/hash-files.mjs.map +1 -0
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.d.cts +6 -6
  52. package/dist/index.d.mts +6 -6
  53. package/dist/index.mjs +1 -1
  54. package/dist/md5.cjs +1 -1
  55. package/dist/md5.d.cts +12 -2
  56. package/dist/md5.d.cts.map +1 -0
  57. package/dist/md5.d.mts +12 -2
  58. package/dist/md5.d.mts.map +1 -0
  59. package/dist/md5.mjs +2 -1
  60. package/dist/md5.mjs.map +1 -0
  61. package/dist/murmurhash.cjs +1 -1
  62. package/dist/murmurhash.d.cts +23 -2
  63. package/dist/murmurhash.d.cts.map +1 -0
  64. package/dist/murmurhash.d.mts +23 -2
  65. package/dist/murmurhash.d.mts.map +1 -0
  66. package/dist/murmurhash.mjs +2 -1
  67. package/dist/murmurhash.mjs.map +1 -0
  68. package/dist/neutral.cjs +1 -1
  69. package/dist/neutral.d.cts +4 -4
  70. package/dist/neutral.d.mts +4 -4
  71. package/dist/neutral.mjs +1 -1
  72. package/dist/path/src/is-type.cjs +1 -0
  73. package/dist/path/src/is-type.mjs +2 -0
  74. package/dist/path/src/is-type.mjs.map +1 -0
  75. package/dist/path/src/join-paths.cjs +1 -0
  76. package/dist/path/src/join-paths.mjs +2 -0
  77. package/dist/path/src/join-paths.mjs.map +1 -0
  78. package/dist/path/src/regex.cjs +1 -0
  79. package/dist/path/src/regex.mjs +2 -0
  80. package/dist/path/src/regex.mjs.map +1 -0
  81. package/dist/path/src/slash.cjs +1 -0
  82. package/dist/path/src/slash.mjs +2 -0
  83. package/dist/path/src/slash.mjs.map +1 -0
  84. package/dist/type-checks/src/index.cjs +1 -0
  85. package/dist/type-checks/src/index.mjs +1 -0
  86. package/dist/type-checks/src/is-buffer.cjs +1 -0
  87. package/dist/type-checks/src/is-buffer.mjs +2 -0
  88. package/dist/type-checks/src/is-buffer.mjs.map +1 -0
  89. package/dist/type-checks/src/is-collection.cjs +1 -0
  90. package/dist/type-checks/src/is-collection.mjs +1 -0
  91. package/dist/type-checks/src/is-string.cjs +1 -0
  92. package/dist/type-checks/src/is-string.mjs +2 -0
  93. package/dist/type-checks/src/is-string.mjs.map +1 -0
  94. package/dist/type-checks/src/type-detect.cjs +1 -0
  95. package/dist/type-checks/src/type-detect.mjs +2 -0
  96. package/dist/type-checks/src/type-detect.mjs.map +1 -0
  97. package/dist/xx-hash.cjs +1 -1
  98. package/dist/xx-hash.d.cts +7 -2
  99. package/dist/xx-hash.d.cts.map +1 -0
  100. package/dist/xx-hash.d.mts +7 -2
  101. package/dist/xx-hash.d.mts.map +1 -0
  102. package/dist/xx-hash.mjs +2 -1
  103. package/dist/xx-hash.mjs.map +1 -0
  104. package/package.json +3 -3
  105. package/dist/digest-311IQaur.mjs +0 -2
  106. package/dist/digest-311IQaur.mjs.map +0 -1
  107. package/dist/digest-CG1Sk96A.d.mts +0 -32
  108. package/dist/digest-CG1Sk96A.d.mts.map +0 -1
  109. package/dist/digest-REorjd4v.cjs +0 -1
  110. package/dist/digest-Yy26O9oW.d.cts +0 -32
  111. package/dist/digest-Yy26O9oW.d.cts.map +0 -1
  112. package/dist/etag-BdoEX_I_.d.cts +0 -22
  113. package/dist/etag-BdoEX_I_.d.cts.map +0 -1
  114. package/dist/etag-DXmoR6hr.mjs +0 -2
  115. package/dist/etag-DXmoR6hr.mjs.map +0 -1
  116. package/dist/etag-Kuj0WZon.d.mts +0 -22
  117. package/dist/etag-Kuj0WZon.d.mts.map +0 -1
  118. package/dist/etag-SIhKWCBx.cjs +0 -1
  119. package/dist/hash-files-BMmt9LzB.mjs +0 -2
  120. package/dist/hash-files-BMmt9LzB.mjs.map +0 -1
  121. package/dist/hash-files-C8KCroZK.d.mts +0 -26
  122. package/dist/hash-files-C8KCroZK.d.mts.map +0 -1
  123. package/dist/hash-files-DMXzIbQw.d.cts +0 -26
  124. package/dist/hash-files-DMXzIbQw.d.cts.map +0 -1
  125. package/dist/hash-files-DNDrDY17.cjs +0 -1
  126. package/dist/md5-CCxA7tZv.d.cts +0 -12
  127. package/dist/md5-CCxA7tZv.d.cts.map +0 -1
  128. package/dist/md5-C_8IsDev.d.mts +0 -12
  129. package/dist/md5-C_8IsDev.d.mts.map +0 -1
  130. package/dist/md5-CnYTBU9u.mjs +0 -2
  131. package/dist/md5-CnYTBU9u.mjs.map +0 -1
  132. package/dist/md5-Cwdph7YU.cjs +0 -1
  133. package/dist/murmurhash-CVcuhG5F.cjs +0 -1
  134. package/dist/murmurhash-CoNWpOwZ.mjs +0 -2
  135. package/dist/murmurhash-CoNWpOwZ.mjs.map +0 -1
  136. package/dist/murmurhash-D6qhmMhz.d.mts +0 -23
  137. package/dist/murmurhash-D6qhmMhz.d.mts.map +0 -1
  138. package/dist/murmurhash-dzYfmtjT.d.cts +0 -23
  139. package/dist/murmurhash-dzYfmtjT.d.cts.map +0 -1
  140. package/dist/src-GI5wB-mz.mjs +0 -2
  141. package/dist/src-GI5wB-mz.mjs.map +0 -1
  142. package/dist/src-QUlAu3to.cjs +0 -1
  143. package/dist/xx-hash--6giOvM7.cjs +0 -1
  144. package/dist/xx-hash-BnLXga7m.d.cts +0 -7
  145. package/dist/xx-hash-BnLXga7m.d.cts.map +0 -1
  146. package/dist/xx-hash-DyeY-GKZ.d.mts +0 -7
  147. package/dist/xx-hash-DyeY-GKZ.d.mts.map +0 -1
  148. package/dist/xx-hash-SyVhkkcA.mjs +0 -2
  149. package/dist/xx-hash-SyVhkkcA.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"hash-files-DMXzIbQw.d.cts","names":[],"sources":["../../fs/src/list-files.ts","../src/hash-files.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,WAAA,GAAc;;;;;AAA1B;;;;ACMA;AAqBsB,iBArBA,SAAA,CAqBa,KAAA,EAAA,MAAA,EAAA,EAAA,OAAA,CAAA,EAnBvB,WAmBuB,CAAA,EAlBhC,OAkBgC,CAAA,MAAA,CAAA;;;;;;;;iBAAb,aAAA,kCAEX,cAAc,cACtB"}
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./src-QUlAu3to.cjs`),l=require(`./murmurhash-CVcuhG5F.cjs`);let u=require(`defu`);u=s(u);let d=require(`glob`),f=require(`node:fs/promises`);const p=/^[A-Z]:\//i,m=/^[A-Z]:$/i,h=/^[/\\]{2}/,g=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;function _(e){return g.test(y(e))}function v(e){return _(e)}function y(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}function b(e=``){return e&&e.replace(/\\/g,`/`).replace(p,e=>e.toUpperCase())}function x(e){if(!e||e.length===0)return`.`;e=b(e);let t=e.match(h),n=v(e),r=e[e.length-1]===`/`;return e=C(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),m.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!v(e)?`/${e}`:e)}function S(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;e&&r?t+=n.slice(1):t+=e||r?n:`/${n}`}else t+=n;return x(t)}function C(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}const w={dot:!0};async function T(e,t){return(0,d.glob)(c.t(e)?e.includes(`*`)?e:S(e,`**/*`):e.input?S(e.input,e.glob):e.glob,(0,u.default)(c.t(e)?{}:{dot:e.dot,ignore:e.ignore},t??{},w))}async function E(e,t){let n=(await T(e,(0,u.default)({withFileTypes:!0},t??{}))).filter(e=>e.isFile());return t?.withFileTypes?n:n.map(e=>e.fullpath())}const D=async e=>{if(!e)throw Error(`No file path provided to read data`);return(0,f.readFile)(e,{encoding:`utf8`})};async function O(e,t){let n={};return await Promise.all(e.map(async e=>{n[e]=await D(e)})),l.t(n,t)}async function k(e,t={}){return t.ignore=t.ignore??[`**/node_modules/**`,`**/.git/**`,`**/.nx/**`,`**/.cache/**`,`**/.storm/**`,`**/tmp/**`],O(await E(e,t),t)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
@@ -1,12 +0,0 @@
1
- //#region src/md5.d.ts
2
- /**
3
- * Generate an MD5 hash of the provided content.
4
- *
5
- * @param content - The content to hash.
6
- * @param length - The length of the hash to return.
7
- * @returns The generated MD5 hash.
8
- */
9
- declare function md5(content: string, length?: number): string;
10
- //#endregion
11
- export { md5 as t };
12
- //# sourceMappingURL=md5-CCxA7tZv.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"md5-CCxA7tZv.d.cts","names":[],"sources":["../src/md5.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;iBAAgB,GAAA"}
@@ -1,12 +0,0 @@
1
- //#region src/md5.d.ts
2
- /**
3
- * Generate an MD5 hash of the provided content.
4
- *
5
- * @param content - The content to hash.
6
- * @param length - The length of the hash to return.
7
- * @returns The generated MD5 hash.
8
- */
9
- declare function md5(content: string, length?: number): string;
10
- //#endregion
11
- export { md5 as t };
12
- //# sourceMappingURL=md5-C_8IsDev.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"md5-C_8IsDev.d.mts","names":[],"sources":["../src/md5.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;iBAAgB,GAAA"}
@@ -1,2 +0,0 @@
1
- import{createHash as e}from"node:crypto";function t(t,n=32){return e(`md5`).update(t).digest(`hex`).slice(0,n)}export{t};
2
- //# sourceMappingURL=md5-CnYTBU9u.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"md5-CnYTBU9u.mjs","names":[],"sources":["../src/md5.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 { createHash } from \"node:crypto\";\n\n/**\n * Generate an MD5 hash of the provided content.\n *\n * @param content - The content to hash.\n * @param length - The length of the hash to return.\n * @returns The generated MD5 hash.\n */\nexport function md5(content: string, length = 32) {\n return createHash(\"md5\").update(content).digest(\"hex\").slice(0, length);\n}\n"],"mappings":"yCA2BA,SAAgB,EAAI,EAAiB,EAAS,GAAI,CAChD,OAAO,EAAW,MAAM,CAAC,OAAO,EAAQ,CAAC,OAAO,MAAM,CAAC,MAAM,EAAG,EAAO"}
@@ -1 +0,0 @@
1
- const e=require(`./hash-files-DNDrDY17.cjs`);let t=require(`node:crypto`);function n(e,n=32){return(0,t.createHash)(`md5`).update(e).digest(`hex`).slice(0,n)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -1 +0,0 @@
1
- const e=require(`./hash-files-DNDrDY17.cjs`);let t=require(`ohash`);function n(e,n){let r=(0,t.hash)(e),i=n?.maxLength??32;return r.length>i?r.slice(0,i):r}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -1,2 +0,0 @@
1
- import{hash as e}from"ohash";function t(t,n){let r=e(t),i=n?.maxLength??32;return r.length>i?r.slice(0,i):r}export{t};
2
- //# sourceMappingURL=murmurhash-CoNWpOwZ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"murmurhash-CoNWpOwZ.mjs","names":["ohash"],"sources":["../src/murmurhash.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 { hash as ohash } from \"ohash\";\n\nexport interface HashOptions {\n /**\n * The maximum length of the hash\n *\n * @defaultValue 32\n */\n maxLength?: number;\n}\n\n/**\n * Use a [MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash) based algorithm to hash any JS value into a string.\n *\n * @see https://github.com/ohash/ohash\n * @see https://en.wikipedia.org/wiki/MurmurHash\n *\n * @param content - The value to hash\n * @param options - Hashing options\n * @returns A hashed string value\n */\nexport function murmurhash(content: any, options?: HashOptions): string {\n const result = ohash(content);\n const maxLength = options?.maxLength ?? 32;\n\n return result.length > maxLength ? result.slice(0, maxLength) : result;\n}\n"],"mappings":"6BAuCA,SAAgB,EAAW,EAAc,EAA+B,CACtE,IAAM,EAASA,EAAM,EAAQ,CACvB,EAAY,GAAS,WAAa,GAExC,OAAO,EAAO,OAAS,EAAY,EAAO,MAAM,EAAG,EAAU,CAAG"}
@@ -1,23 +0,0 @@
1
- //#region src/murmurhash.d.ts
2
- interface HashOptions {
3
- /**
4
- * The maximum length of the hash
5
- *
6
- * @defaultValue 32
7
- */
8
- maxLength?: number;
9
- }
10
- /**
11
- * Use a [MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash) based algorithm to hash any JS value into a string.
12
- *
13
- * @see https://github.com/ohash/ohash
14
- * @see https://en.wikipedia.org/wiki/MurmurHash
15
- *
16
- * @param content - The value to hash
17
- * @param options - Hashing options
18
- * @returns A hashed string value
19
- */
20
- declare function murmurhash(content: any, options?: HashOptions): string;
21
- //#endregion
22
- export { murmurhash as n, HashOptions as t };
23
- //# sourceMappingURL=murmurhash-D6qhmMhz.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"murmurhash-D6qhmMhz.d.mts","names":[],"sources":["../src/murmurhash.ts"],"sourcesContent":[],"mappings":";UAoBiB,WAAA;EAAA;AAmBjB;;;;;;;;;;;;;;;;iBAAgB,UAAA,yBAAmC"}
@@ -1,23 +0,0 @@
1
- //#region src/murmurhash.d.ts
2
- interface HashOptions {
3
- /**
4
- * The maximum length of the hash
5
- *
6
- * @defaultValue 32
7
- */
8
- maxLength?: number;
9
- }
10
- /**
11
- * Use a [MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash) based algorithm to hash any JS value into a string.
12
- *
13
- * @see https://github.com/ohash/ohash
14
- * @see https://en.wikipedia.org/wiki/MurmurHash
15
- *
16
- * @param content - The value to hash
17
- * @param options - Hashing options
18
- * @returns A hashed string value
19
- */
20
- declare function murmurhash(content: any, options?: HashOptions): string;
21
- //#endregion
22
- export { murmurhash as n, HashOptions as t };
23
- //# sourceMappingURL=murmurhash-dzYfmtjT.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"murmurhash-dzYfmtjT.d.cts","names":[],"sources":["../src/murmurhash.ts"],"sourcesContent":[],"mappings":";UAoBiB,WAAA;EAAA;AAmBjB;;;;;;;;;;;;;;;;iBAAgB,UAAA,yBAAmC"}
@@ -1,2 +0,0 @@
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 e=e=>{try{return typeof e==`string`}catch{return!1}};export{e as t};
2
- //# sourceMappingURL=src-GI5wB-mz.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"src-GI5wB-mz.mjs","names":["isBuffer: typeof Buffer.isBuffer","isBuffer"],"sources":["../../type-checks/src/is-buffer.ts","../../type-checks/src/type-detect.ts","../../type-checks/src/is-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\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"],"mappings":"AAkB8B,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"}
@@ -1 +0,0 @@
1
- const e=typeof Buffer<`u`,t=e?Buffer.isBuffer.bind(Buffer):function(e){return!1},n=(e=>(typeof globalThis==`object`||Object.defineProperty(e,`typeDetectGlobalObject`,{get(){return this},configurable:!0}),globalThis))(Object.prototype),r=e=>{try{return typeof e==`string`}catch{return!1}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
@@ -1 +0,0 @@
1
- const e=require(`./hash-files-DNDrDY17.cjs`);let t=require(`js-xxhash`);function n(e,n){let r=0n;for(let i=0;i<n;i++)r=(r<<32n)+BigInt((0,t.xxHash32)(e,i));return r}const r=e=>(0,t.xxHash32)(e,0),i=e=>n(e,2),a=e=>n(e,4);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -1,7 +0,0 @@
1
- //#region src/xx-hash.d.ts
2
- declare const xxHash32: (s: string) => number;
3
- declare const xxHash64: (s: string) => bigint;
4
- declare const xxHash128: (s: string) => bigint;
5
- //#endregion
6
- export { xxHash32 as n, xxHash64 as r, xxHash128 as t };
7
- //# sourceMappingURL=xx-hash-BnLXga7m.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"xx-hash-BnLXga7m.d.cts","names":[],"sources":["../src/xx-hash.ts"],"sourcesContent":[],"mappings":";cAoCa;AAAA,cACA,QAD4C,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,GAAA,MAAA;AAC5C,cACA,SADyC,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,GAAA,MAAA"}
@@ -1,7 +0,0 @@
1
- //#region src/xx-hash.d.ts
2
- declare const xxHash32: (s: string) => number;
3
- declare const xxHash64: (s: string) => bigint;
4
- declare const xxHash128: (s: string) => bigint;
5
- //#endregion
6
- export { xxHash32 as n, xxHash64 as r, xxHash128 as t };
7
- //# sourceMappingURL=xx-hash-DyeY-GKZ.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"xx-hash-DyeY-GKZ.d.mts","names":[],"sources":["../src/xx-hash.ts"],"sourcesContent":[],"mappings":";cAoCa;AAAA,cACA,QAD4C,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,GAAA,MAAA;AAC5C,cACA,SADyC,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,GAAA,MAAA"}
@@ -1,2 +0,0 @@
1
- import{xxHash32 as e}from"js-xxhash";function t(t,n){let r=0n;for(let i=0;i<n;i++)r=(r<<32n)+BigInt(e(t,i));return r}const n=t=>e(t,0),r=e=>t(e,2),i=e=>t(e,4);export{n,r,i as t};
2
- //# sourceMappingURL=xx-hash-SyVhkkcA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"xx-hash-SyVhkkcA.mjs","names":["xxHash32Base","xxHash32"],"sources":["../src/xx-hash.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 { xxHash32 as xxHash32Base } from \"js-xxhash\";\n\n/**\n * xxHash32 only computes 32-bit values. Run it n times with different seeds to\n * get a larger hash with better collision resistance.\n *\n * @param content - The string to hash\n * @param words - The number of 32-bit words to hash\n * @returns A 128-bit hash\n */\nfunction _xxHash32(content: string, words: number): bigint {\n let hash = 0n;\n for (let i = 0; i < words; i++) {\n hash = (hash << 32n) + BigInt(xxHash32Base(content, i));\n }\n return hash;\n}\n\nexport const xxHash32 = (s: string) => xxHash32Base(s, 0);\nexport const xxHash64 = (s: string) => _xxHash32(s, 2);\nexport const xxHash128 = (s: string) => _xxHash32(s, 4);\n"],"mappings":"qCA4BA,SAAS,EAAU,EAAiB,EAAuB,CACzD,IAAI,EAAO,GACX,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,IACzB,GAAQ,GAAQ,KAAO,OAAOA,EAAa,EAAS,EAAE,CAAC,CAEzD,OAAO,EAGT,MAAaC,EAAY,GAAcD,EAAa,EAAG,EAAE,CAC5C,EAAY,GAAc,EAAU,EAAG,EAAE,CACzC,EAAa,GAAc,EAAU,EAAG,EAAE"}