foxts 3.10.0 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ declare function chunk<T>(arr: readonly T[], size: number): T[][];
2
+
3
+ export { chunk };
package/dist/chunk.js ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.chunk=function(e,t){let r=Math.ceil(e.length/t),l=Array(r),n=0,o=0;for(let c=0;c<r;c++)o=(n=c*t)+t,l[c]=e.slice(n,o);return l};
package/dist/chunk.mjs ADDED
@@ -0,0 +1 @@
1
+ function e(e,t){let r=Math.ceil(e.length/t),l=Array(r),n=0,c=0;for(let h=0;h<r;h++)c=(n=h*t)+t,l[h]=e.slice(n,c);return l}export{e as chunk};
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringJoin=function(e,t=",",r=!1){let n;if(0===e.length)return"";r&&(e=Array.from(new Set(e)));let o=e.length,l="";for(let r=0;r<o-1;r++)(n=e[r])&&(l+=n,l+=t);return(n=e[o-1])&&(l+=n),l};
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringJoin=function(e,r=",",t=!1){let n,o=e.length;if(0===o)return"";t&&(e=Array.from(new Set(e)));let l="",f=!1;for(let t=0;t<o;t++)(n=e[t])&&(f?l+=r:f=!0,l+=n);return l};
@@ -1 +1 @@
1
- function t(e,r=",",n=!1){let l;if(0===e.length)return"";n&&(e=Array.from(new Set(e)));let o=e.length,f="";for(let t=0;t<o-1;t++)(l=e[t])&&(f+=l,f+=r);return(l=e[o-1])&&(f+=l),f}export{t as stringJoin};
1
+ function r(t,e=",",n=!1){let o,f=t.length;if(0===f)return"";n&&(t=Array.from(new Set(t)));let i="",l=!1;for(let r=0;r<f;r++)(o=t[r])&&(l?i+=e:l=!0,i+=o);return i}export{r as stringJoin};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxts",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "description": "Opinionated collection of common TypeScript utils by @SukkaW",
5
5
  "repository": {
6
6
  "url": "https://github.com/SukkaW/foxts"
@@ -218,6 +218,12 @@
218
218
  "import": "./dist/available-parallelism.mjs",
219
219
  "require": "./dist/available-parallelism.js",
220
220
  "default": "./dist/available-parallelism.js"
221
+ },
222
+ "./chunk": {
223
+ "types": "./dist/chunk.d.ts",
224
+ "import": "./dist/chunk.mjs",
225
+ "require": "./dist/chunk.js",
226
+ "default": "./dist/chunk.js"
221
227
  }
222
228
  },
223
229
  "sideEffects": false,