@aliexme/js-utils 2.1.3 → 2.2.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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +40 -36
- package/dist/number/floor.cjs +1 -0
- package/dist/number/floor.d.ts +1 -0
- package/dist/number/floor.js +4 -0
- package/dist/number/index.d.ts +2 -0
- package/dist/number/randomInt.cjs +1 -1
- package/dist/number/randomInt.d.ts +1 -1
- package/dist/number/randomInt.js +3 -2
- package/dist/number/randomNumber.cjs +1 -0
- package/dist/number/randomNumber.d.ts +4 -0
- package/dist/number/randomNumber.js +8 -0
- package/dist/number/round.cjs +1 -1
- package/dist/number/round.d.ts +1 -3
- package/dist/number/round.js +1 -4
- package/package.json +2 -2
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"),
|
|
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/randomNumber.cjs"),s=require("./number/randomInt.cjs"),u=require("./array/uniquify.cjs"),a=require("./array/subtractArrays.cjs"),y=require("./array/arraysIntersection.cjs"),m=require("./array/groupArrayItems.cjs"),d=require("./array/randomArrayItem.cjs"),q=require("./object/getObjectKey.cjs"),b=require("./object/findObjectKey.cjs"),l=require("./object/objectForEach.cjs"),p=require("./object/omitObjectProperties.cjs"),f=require("./object/omitUndefinedObjectValues.cjs"),j=require("./function/noop.cjs"),g=require("./function/debounce.cjs"),O=require("./function/throttle.cjs"),I=require("./async/asyncify.cjs"),A=require("./async/asyncResult.cjs"),S=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.randomNumber=i.randomNumber;exports.randomInt=s.randomInt;exports.uniquify=u.uniquify;exports.subtractArrays=a.subtractArrays;exports.arraysIntersection=y.arraysIntersection;exports.groupArrayItems=m.groupArrayItems;exports.randomArrayItem=d.randomArrayItem;exports.getObjectKey=q.getObjectKey;exports.findObjectKey=b.findObjectKey;exports.objectForEach=l.objectForEach;exports.omitObjectProperties=p.omitObjectProperties;exports.omitUndefinedObjectValues=f.omitUndefinedObjectValues;exports.noop=j.noop;exports.debounce=g.debounce;exports.throttle=O.throttle;exports.asyncify=I.asyncify;exports.asyncResult=A.asyncResult;exports.sleep=S.sleep;
|
package/dist/index.js
CHANGED
|
@@ -2,45 +2,49 @@ import { capitalize as e } from "./string/capitalize.js";
|
|
|
2
2
|
import { secureString as m } from "./string/secureString.js";
|
|
3
3
|
import { randomString as f } from "./string/randomString.js";
|
|
4
4
|
import { round as n } from "./number/round.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
5
|
+
import { floor as c } from "./number/floor.js";
|
|
6
|
+
import { clamp as s } from "./number/clamp.js";
|
|
7
|
+
import { randomNumber as y } from "./number/randomNumber.js";
|
|
8
|
+
import { randomInt as b } from "./number/randomInt.js";
|
|
9
|
+
import { uniquify as j } from "./array/uniquify.js";
|
|
10
|
+
import { subtractArrays as I } from "./array/subtractArrays.js";
|
|
11
|
+
import { arraysIntersection as A } from "./array/arraysIntersection.js";
|
|
12
|
+
import { groupArrayItems as K } from "./array/groupArrayItems.js";
|
|
13
|
+
import { randomArrayItem as q } from "./array/randomArrayItem.js";
|
|
14
|
+
import { getObjectKey as E } from "./object/getObjectKey.js";
|
|
15
|
+
import { findObjectKey as N } from "./object/findObjectKey.js";
|
|
16
|
+
import { objectForEach as R } from "./object/objectForEach.js";
|
|
17
|
+
import { omitObjectProperties as V } from "./object/omitObjectProperties.js";
|
|
18
|
+
import { omitUndefinedObjectValues as v } from "./object/omitUndefinedObjectValues.js";
|
|
19
|
+
import { noop as B } from "./function/noop.js";
|
|
20
|
+
import { debounce as D } from "./function/debounce.js";
|
|
21
|
+
import { throttle as H } from "./function/throttle.js";
|
|
22
|
+
import { asyncify as L } from "./async/asyncify.js";
|
|
23
|
+
import { asyncResult as Q } from "./async/asyncResult.js";
|
|
24
|
+
import { sleep as W } from "./async/sleep.js";
|
|
23
25
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
A as arraysIntersection,
|
|
27
|
+
Q as asyncResult,
|
|
28
|
+
L as asyncify,
|
|
27
29
|
e as capitalize,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
s as clamp,
|
|
31
|
+
D as debounce,
|
|
32
|
+
N as findObjectKey,
|
|
33
|
+
c as floor,
|
|
34
|
+
E as getObjectKey,
|
|
35
|
+
K as groupArrayItems,
|
|
36
|
+
B as noop,
|
|
37
|
+
R as objectForEach,
|
|
38
|
+
V as omitObjectProperties,
|
|
39
|
+
v as omitUndefinedObjectValues,
|
|
40
|
+
q as randomArrayItem,
|
|
41
|
+
b as randomInt,
|
|
42
|
+
y as randomNumber,
|
|
39
43
|
f as randomString,
|
|
40
44
|
n as round,
|
|
41
45
|
m as secureString,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
W as sleep,
|
|
47
|
+
I as subtractArrays,
|
|
48
|
+
H as throttle,
|
|
49
|
+
j as uniquify
|
|
46
50
|
};
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const floor: (value: number, precision?: number) => number;
|
package/dist/number/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./randomNumber.cjs"),o=(r=0,e=999999)=>n.randomNumber(r,e,{precision:0});exports.randomInt=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const randomInt: (
|
|
1
|
+
export declare const randomInt: (min?: number, max?: number) => number;
|
package/dist/number/randomInt.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./floor.cjs"),u=(r=0,o=999999,e={})=>{const{precision:t=2}=e;return n.floor(Math.random()*(o-r+1),t)+r};exports.randomNumber=u;
|
package/dist/number/round.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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;
|
package/dist/number/round.d.ts
CHANGED
package/dist/number/round.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aliexme/js-utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Common JavaScript utilities",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Alexander Smirnov <al.smirnov996@gmail.com>",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"build": "vite build",
|
|
33
33
|
"ts:check": "tsc --noEmit"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "28e586ee30ce923e8d24211730f60d5490e1beb8"
|
|
36
36
|
}
|