@aliexme/js-utils 1.2.0-alpha.1 → 2.0.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.
@@ -1,2 +1,3 @@
1
1
  export * from './asyncify';
2
2
  export * from './asyncResult';
3
+ export * from './sleep';
@@ -0,0 +1 @@
1
+ export declare const sleep: (ms: number) => Promise<void>;
@@ -0,0 +1,4 @@
1
+ const t = async (e) => new Promise((s) => setTimeout(s, e));
2
+ export {
3
+ t as sleep
4
+ };
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { capitalize as e } from "./string/capitalize.js";
2
2
  import { secureString as m } from "./string/secureString.js";
3
- import { randomString as p } from "./string/randomString.js";
3
+ import { randomString as f } from "./string/randomString.js";
4
4
  import { round as n } from "./number/round.js";
5
5
  import { randomInt as i } from "./number/randomInt.js";
6
6
  import { uniquify as s } from "./array/uniquify.js";
7
7
  import { subtractArrays as u } from "./array/subtractArrays.js";
8
8
  import { arraysIntersection as b } from "./array/arraysIntersection.js";
9
9
  import { groupArrayItems as g } from "./array/groupArrayItems.js";
10
- import { randomArrayItem as O } from "./array/randomArrayItem.js";
10
+ import { randomArrayItem as I } from "./array/randomArrayItem.js";
11
11
  import { getObjectKey as A } from "./object/getObjectKey.js";
12
12
  import { findObjectKey as S } from "./object/findObjectKey.js";
13
13
  import { objectForEach as q } from "./object/objectForEach.js";
@@ -16,6 +16,7 @@ import { omitUndefinedObjectValues as P } from "./object/omitUndefinedObjectValu
16
16
  import { noop as U } from "./function/noop.js";
17
17
  import { asyncify as k } from "./async/asyncify.js";
18
18
  import { asyncResult as w } from "./async/asyncResult.js";
19
+ import { sleep as C } from "./async/sleep.js";
19
20
  export {
20
21
  b as arraysIntersection,
21
22
  w as asyncResult,
@@ -28,11 +29,12 @@ export {
28
29
  q as objectForEach,
29
30
  E as omitObjectProperties,
30
31
  P as omitUndefinedObjectValues,
31
- O as randomArrayItem,
32
+ I as randomArrayItem,
32
33
  i as randomInt,
33
- p as randomString,
34
+ f as randomString,
34
35
  n as round,
35
36
  m as secureString,
37
+ C as sleep,
36
38
  u as subtractArrays,
37
39
  s as uniquify
38
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliexme/js-utils",
3
- "version": "1.2.0-alpha.1",
3
+ "version": "2.0.0",
4
4
  "description": "Common JavaScript utilities",
5
5
  "private": false,
6
6
  "author": "Alexander Smirnov <al.smirnov996@gmail.com>",
@@ -25,5 +25,5 @@
25
25
  "build": "vite build",
26
26
  "ts:check": "tsc --noEmit"
27
27
  },
28
- "gitHead": "2106876d0d328dd81f7ff58c6e558465d2ca8804"
28
+ "gitHead": "0ccacb743bc09c4cdaf216d69109bb269bd75cc5"
29
29
  }