@aliexme/js-utils 2.4.0 → 2.4.1

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.
@@ -1,5 +1,5 @@
1
- export * from './uniquify';
2
- export * from './subtractArrays';
3
1
  export * from './arraysIntersection';
4
2
  export * from './groupArrayItems';
5
3
  export * from './randomArrayItem';
4
+ export * from './subtractArrays';
5
+ export * from './uniquify';
@@ -1,3 +1,3 @@
1
- export * from './noop';
2
1
  export * from './debounce';
2
+ export * from './noop';
3
3
  export * from './throttle';
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./string/capitalize.cjs"),r=require("./string/secureString.cjs"),t=require("./string/randomString.cjs"),o=require("./number/round.cjs"),n=require("./number/floor.cjs"),c=require("./number/clamp.cjs"),i=require("./number/lerp.cjs"),s=require("./number/randomNumber.cjs"),u=require("./number/randomInt.cjs"),a=require("./array/uniquify.cjs"),y=require("./array/subtractArrays.cjs"),m=require("./array/arraysIntersection.cjs"),d=require("./array/groupArrayItems.cjs"),q=require("./array/randomArrayItem.cjs"),l=require("./object/getObjectKey.cjs"),b=require("./object/findObjectKey.cjs"),p=require("./object/objectForEach.cjs"),f=require("./object/omitObjectProperties.cjs"),j=require("./object/omitUndefinedObjectValues.cjs"),g=require("./function/noop.cjs"),O=require("./function/debounce.cjs"),I=require("./function/throttle.cjs"),A=require("./async/asyncify.cjs"),S=require("./async/asyncResult.cjs"),h=require("./async/sleep.cjs");exports.capitalize=e.capitalize;exports.secureString=r.secureString;exports.randomString=t.randomString;exports.round=o.round;exports.floor=n.floor;exports.clamp=c.clamp;exports.lerp=i.lerp;exports.randomNumber=s.randomNumber;exports.randomInt=u.randomInt;exports.uniquify=a.uniquify;exports.subtractArrays=y.subtractArrays;exports.arraysIntersection=m.arraysIntersection;exports.groupArrayItems=d.groupArrayItems;exports.randomArrayItem=q.randomArrayItem;exports.getObjectKey=l.getObjectKey;exports.findObjectKey=b.findObjectKey;exports.objectForEach=p.objectForEach;exports.omitObjectProperties=f.omitObjectProperties;exports.omitUndefinedObjectValues=j.omitUndefinedObjectValues;exports.noop=g.noop;exports.debounce=O.debounce;exports.throttle=I.throttle;exports.asyncify=A.asyncify;exports.asyncResult=S.asyncResult;exports.sleep=h.sleep;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./array/arraysIntersection.cjs"),r=require("./async/asyncResult.cjs"),t=require("./async/asyncify.cjs"),o=require("./string/capitalize.cjs"),n=require("./number/clamp.cjs"),c=require("./function/debounce.cjs"),i=require("./object/findObjectKey.cjs"),s=require("./number/floor.cjs"),u=require("./object/getObjectKey.cjs"),a=require("./array/groupArrayItems.cjs"),y=require("./number/lerp.cjs"),m=require("./function/noop.cjs"),d=require("./object/objectForEach.cjs"),q=require("./object/omitObjectProperties.cjs"),l=require("./object/omitUndefinedObjectValues.cjs"),b=require("./array/randomArrayItem.cjs"),p=require("./number/randomInt.cjs"),f=require("./number/randomNumber.cjs"),j=require("./string/randomString.cjs"),g=require("./number/round.cjs"),O=require("./string/secureString.cjs"),I=require("./async/sleep.cjs"),A=require("./array/subtractArrays.cjs"),S=require("./function/throttle.cjs"),h=require("./array/uniquify.cjs");exports.arraysIntersection=e.arraysIntersection;exports.asyncResult=r.asyncResult;exports.asyncify=t.asyncify;exports.capitalize=o.capitalize;exports.clamp=n.clamp;exports.debounce=c.debounce;exports.findObjectKey=i.findObjectKey;exports.floor=s.floor;exports.getObjectKey=u.getObjectKey;exports.groupArrayItems=a.groupArrayItems;exports.lerp=y.lerp;exports.noop=m.noop;exports.objectForEach=d.objectForEach;exports.omitObjectProperties=q.omitObjectProperties;exports.omitUndefinedObjectValues=l.omitUndefinedObjectValues;exports.randomArrayItem=b.randomArrayItem;exports.randomInt=p.randomInt;exports.randomNumber=f.randomNumber;exports.randomString=j.randomString;exports.round=g.round;exports.secureString=O.secureString;exports.sleep=I.sleep;exports.subtractArrays=A.subtractArrays;exports.throttle=S.throttle;exports.uniquify=h.uniquify;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from './string';
2
- export * from './number';
3
1
  export * from './array';
4
- export * from './object';
5
- export * from './function';
6
2
  export * from './async';
3
+ export * from './function';
4
+ export * from './number';
5
+ export * from './object';
6
+ export * from './string';
package/dist/index.js CHANGED
@@ -1,52 +1,52 @@
1
- import { capitalize as e } from "./string/capitalize.js";
2
- import { secureString as m } from "./string/secureString.js";
3
- import { randomString as f } from "./string/randomString.js";
4
- import { round as n } from "./number/round.js";
5
- import { floor as c } from "./number/floor.js";
6
- import { clamp as s } from "./number/clamp.js";
7
- import { lerp as y } from "./number/lerp.js";
8
- import { randomNumber as b } from "./number/randomNumber.js";
9
- import { randomInt as j } from "./number/randomInt.js";
10
- import { uniquify as I } from "./array/uniquify.js";
11
- import { subtractArrays as A } from "./array/subtractArrays.js";
12
- import { arraysIntersection as K } from "./array/arraysIntersection.js";
13
- import { groupArrayItems as q } from "./array/groupArrayItems.js";
14
- import { randomArrayItem as E } from "./array/randomArrayItem.js";
15
- import { getObjectKey as N } from "./object/getObjectKey.js";
16
- import { findObjectKey as R } from "./object/findObjectKey.js";
17
- import { objectForEach as V } from "./object/objectForEach.js";
18
- import { omitObjectProperties as v } from "./object/omitObjectProperties.js";
19
- import { omitUndefinedObjectValues as B } from "./object/omitUndefinedObjectValues.js";
20
- import { noop as D } from "./function/noop.js";
21
- import { debounce as H } from "./function/debounce.js";
22
- import { throttle as L } from "./function/throttle.js";
23
- import { asyncify as Q } from "./async/asyncify.js";
24
- import { asyncResult as W } from "./async/asyncResult.js";
25
- import { sleep as Y } from "./async/sleep.js";
1
+ import { arraysIntersection as e } from "./array/arraysIntersection.js";
2
+ import { asyncResult as m } from "./async/asyncResult.js";
3
+ import { asyncify as f } from "./async/asyncify.js";
4
+ import { capitalize as n } from "./string/capitalize.js";
5
+ import { clamp as c } from "./number/clamp.js";
6
+ import { debounce as s } from "./function/debounce.js";
7
+ import { findObjectKey as y } from "./object/findObjectKey.js";
8
+ import { floor as b } from "./number/floor.js";
9
+ import { getObjectKey as j } from "./object/getObjectKey.js";
10
+ import { groupArrayItems as I } from "./array/groupArrayItems.js";
11
+ import { lerp as A } from "./number/lerp.js";
12
+ import { noop as K } from "./function/noop.js";
13
+ import { objectForEach as q } from "./object/objectForEach.js";
14
+ import { omitObjectProperties as E } from "./object/omitObjectProperties.js";
15
+ import { omitUndefinedObjectValues as N } from "./object/omitUndefinedObjectValues.js";
16
+ import { randomArrayItem as R } from "./array/randomArrayItem.js";
17
+ import { randomInt as V } from "./number/randomInt.js";
18
+ import { randomNumber as v } from "./number/randomNumber.js";
19
+ import { randomString as B } from "./string/randomString.js";
20
+ import { round as D } from "./number/round.js";
21
+ import { secureString as H } from "./string/secureString.js";
22
+ import { sleep as L } from "./async/sleep.js";
23
+ import { subtractArrays as Q } from "./array/subtractArrays.js";
24
+ import { throttle as W } from "./function/throttle.js";
25
+ import { uniquify as Y } from "./array/uniquify.js";
26
26
  export {
27
- K as arraysIntersection,
28
- W as asyncResult,
29
- Q as asyncify,
30
- e as capitalize,
31
- s as clamp,
32
- H as debounce,
33
- R as findObjectKey,
34
- c as floor,
35
- N as getObjectKey,
36
- q as groupArrayItems,
37
- y as lerp,
38
- D as noop,
39
- V as objectForEach,
40
- v as omitObjectProperties,
41
- B as omitUndefinedObjectValues,
42
- E as randomArrayItem,
43
- j as randomInt,
44
- b as randomNumber,
45
- f as randomString,
46
- n as round,
47
- m as secureString,
48
- Y as sleep,
49
- A as subtractArrays,
50
- L as throttle,
51
- I as uniquify
27
+ e as arraysIntersection,
28
+ m as asyncResult,
29
+ f as asyncify,
30
+ n as capitalize,
31
+ c as clamp,
32
+ s as debounce,
33
+ y as findObjectKey,
34
+ b as floor,
35
+ j as getObjectKey,
36
+ I as groupArrayItems,
37
+ A as lerp,
38
+ K as noop,
39
+ q as objectForEach,
40
+ E as omitObjectProperties,
41
+ N as omitUndefinedObjectValues,
42
+ R as randomArrayItem,
43
+ V as randomInt,
44
+ v as randomNumber,
45
+ B as randomString,
46
+ D as round,
47
+ H as secureString,
48
+ L as sleep,
49
+ Q as subtractArrays,
50
+ W as throttle,
51
+ Y as uniquify
52
52
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=(t,o=0)=>Math.floor(t*Math.pow(10,o))/Math.pow(10,o);exports.floor=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=(t,o=0)=>Math.floor(t*10**o)/10**o;exports.floor=r;
@@ -1,4 +1,4 @@
1
- const r = (t, o = 0) => Math.floor(t * Math.pow(10, o)) / Math.pow(10, o);
1
+ const t = (r, o = 0) => Math.floor(r * 10 ** o) / 10 ** o;
2
2
  export {
3
- r as floor
3
+ t as floor
4
4
  };
@@ -1,6 +1,6 @@
1
- export * from './round';
2
- export * from './floor';
3
1
  export * from './clamp';
2
+ export * from './floor';
4
3
  export * from './lerp';
5
- export * from './randomNumber';
6
4
  export * from './randomInt';
5
+ export * from './randomNumber';
6
+ export * from './round';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=(o,t=0)=>Math.round(o*Math.pow(10,t))/Math.pow(10,t);exports.round=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=(r,t=0)=>Math.round(r*10**t)/10**t;exports.round=e;
@@ -1,4 +1,4 @@
1
- const r = (o, t = 0) => Math.round(o * Math.pow(10, t)) / Math.pow(10, t);
1
+ const n = (t, r = 0) => Math.round(t * 10 ** r) / 10 ** r;
2
2
  export {
3
- r as round
3
+ n as round
4
4
  };
@@ -1,5 +1,5 @@
1
- export * from './getObjectKey';
2
1
  export * from './findObjectKey';
2
+ export * from './getObjectKey';
3
3
  export * from './objectForEach';
4
4
  export * from './omitObjectProperties';
5
5
  export * from './omitUndefinedObjectValues';
@@ -1,3 +1,3 @@
1
1
  export * from './capitalize';
2
- export * from './secureString';
3
2
  export * from './randomString';
3
+ export * from './secureString';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../number/randomInt.cjs"),u=require("../array/randomArrayItem.cjs"),d=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],i=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],m=["0","1","2","3","4","5","6","7","8","9"],l=["!","#","@","~","$","^",".",",","-","+","%","?","*","="],p={1:d,2:i,3:m,4:l},g=(o={})=>{const{length:n=16}=o;let r="";for(let t=0;t<n;t++){const e=a.randomInt(1,4),s=p[e],c=u.randomArrayItem(s);r+=c}return r};exports.randomString=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../array/randomArrayItem.cjs"),u=require("../number/randomInt.cjs"),d=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],i=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],m=["0","1","2","3","4","5","6","7","8","9"],l=["!","#","@","~","$","^",".",",","-","+","%","?","*","="],p={1:d,2:i,3:m,4:l},g=(o={})=>{const{length:n=16}=o;let r="";for(let t=0;t<n;t++){const e=u.randomInt(1,4),s=p[e],c=a.randomArrayItem(s);r+=c}return r};exports.randomString=g;
@@ -1,5 +1,5 @@
1
- import { randomInt as a } from "../number/randomInt.js";
2
- import { randomArrayItem as m } from "../array/randomArrayItem.js";
1
+ import { randomArrayItem as a } from "../array/randomArrayItem.js";
2
+ import { randomInt as m } from "../number/randomInt.js";
3
3
  const p = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], i = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], l = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], u = ["!", "#", "@", "~", "$", "^", ".", ",", "-", "+", "%", "?", "*", "="], d = {
4
4
  1: p,
5
5
  2: i,
@@ -9,7 +9,7 @@ const p = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
9
9
  const { length: n = 16 } = t;
10
10
  let o = "";
11
11
  for (let r = 0; r < n; r++) {
12
- const s = a(1, 4), c = d[s], e = m(c);
12
+ const s = m(1, 4), c = d[s], e = a(c);
13
13
  o += e;
14
14
  }
15
15
  return o;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliexme/js-utils",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "private": false,
5
5
  "description": "Common JavaScript utilities",
6
6
  "homepage": "https://github.com/aliexme/web-shared/tree/main/packages/js-utils",
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "73fd109626f172b3682864fabf470f5367ecaaee"
35
+ "gitHead": "1d314fb2f9ed2802b1ca152cedff0b0ee853e6dd"
36
36
  }