@mxfb/tools 0.0.34 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxfb/tools",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",
@@ -1,7 +1,7 @@
1
- export declare function random(bound1: number): number;
2
- export declare function random(bound1: number, bound2: number | undefined): number;
1
+ export declare function random(bound1?: number): number | undefined;
2
+ export declare function random(bound1?: number, bound2?: number | undefined): number | undefined;
3
3
  export default random;
4
- export declare function randomInt(bound1?: number, bound2?: number): number;
4
+ export declare function randomInt(...args: Parameters<typeof random>): number | undefined;
5
5
  export declare const hexChars: string[];
6
6
  export declare function randomHexChar(): string;
7
7
  export declare function randomHash(length?: number): string;
@@ -1 +1 @@
1
- function o(n=1,r){let t=r===void 0?0:n,e=r===void 0?n:r;if(t===e||t>e)return NaN;let u=e-t;return Math.random()*u+t}var c=o;function f(n=1,r){let t=o(n,r);return Math.floor(t)}var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function m(){let n=Math.floor(Math.random()*16);return a[n]}function d(n=4){return new Array(n).fill(null).map(m).join("")}function i(n,r="-"){return n.map(d).join(r)}function s(){return i([8,4,4,4,12])}export{c as default,a as hexChars,o as random,d as randomHash,i as randomHashPattern,m as randomHexChar,f as randomInt,s as randomUUID};
1
+ function o(n=1,r){let e=r===void 0?0:n,t=r===void 0?n:r;if(e===t||e>t)return;let u=t-e;return Math.random()*u+e}var f=o;function c(...n){let r=o(...n);return r!==void 0?Math.floor(r):void 0}var d=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function a(){let n=Math.floor(Math.random()*16);return d[n]}function i(n=4){return new Array(n).fill(null).map(a).join("")}function m(n,r="-"){return n.map(i).join(r)}function s(){return m([8,4,4,4,12])}export{f as default,d as hexChars,o as random,i as randomHash,m as randomHashPattern,a as randomHexChar,c as randomInt,s as randomUUID};