@tempots/std 0.13.0 → 0.14.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/array.cjs +1 -1
- package/array.d.ts +35 -35
- package/array.js +108 -167
- package/async-result.d.ts +15 -15
- package/bigint.cjs +1 -1
- package/bigint.d.ts +20 -20
- package/bigint.js +37 -78
- package/boolean.cjs +1 -1
- package/boolean.d.ts +5 -5
- package/boolean.js +10 -19
- package/equal.cjs +1 -1
- package/equal.d.ts +3 -3
- package/equal.js +31 -37
- package/error.cjs +1 -0
- package/error.d.ts +24 -0
- package/error.js +26 -0
- package/function.cjs +1 -1
- package/function.d.ts +3 -3
- package/function.js +4 -10
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +116 -114
- package/number.cjs +1 -1
- package/number.d.ts +25 -46
- package/number.js +29 -86
- package/object.cjs +1 -1
- package/object.d.ts +6 -6
- package/object.js +12 -27
- package/package.json +15 -1
- package/promise.cjs +1 -0
- package/promise.d.ts +11 -0
- package/promise.js +9 -0
- package/regexp.cjs +1 -1
- package/regexp.d.ts +1 -1
- package/regexp.js +8 -8
- package/result.d.ts +8 -8
- package/string.cjs +4 -4
- package/string.d.ts +85 -89
- package/string.js +193 -379
- package/validation.d.ts +7 -7
package/function.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @typeParam T - The type of the input value.
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare
|
|
9
|
+
export declare const identity: <T>(v: T) => T;
|
|
10
10
|
/**
|
|
11
11
|
* Curries a function from left to right.
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ export declare function identity<T>(v: T): T;
|
|
|
14
14
|
* @returns A curried function.
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
17
|
+
export declare const curryLeft: <A, Rest extends unknown[], Ret>(f: (a: A, ...rest: Rest) => Ret) => (a: A) => (...rest: Rest) => Ret;
|
|
18
18
|
/**
|
|
19
19
|
* Memoizes the result of a function and returns a new function that caches the result.
|
|
20
20
|
* The cached result is returned if available, otherwise the original function is called
|
|
@@ -24,4 +24,4 @@ export declare function curryLeft<A, Rest extends any[], Ret>(f: (a: A, ...rest:
|
|
|
24
24
|
* @returns A new function that caches the result of the original function.
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
|
-
export declare
|
|
27
|
+
export declare const memoize: <T>(f: () => NonNullable<T>) => (() => NonNullable<T>);
|
package/function.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
return t;
|
|
3
|
-
}
|
|
4
|
-
function u(t) {
|
|
5
|
-
return (e) => (...n) => t(e, ...n);
|
|
6
|
-
}
|
|
7
|
-
function i(t) {
|
|
1
|
+
const n = (t) => t, o = (t) => (e) => (...r) => t(e, ...r), i = (t) => {
|
|
8
2
|
let e;
|
|
9
3
|
return () => (e === void 0 && (e = t()), e);
|
|
10
|
-
}
|
|
4
|
+
};
|
|
11
5
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
o as curryLeft,
|
|
7
|
+
n as identity,
|
|
14
8
|
i as memoize
|
|
15
9
|
};
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./array.cjs"),l=require("./async-result.cjs"),i=require("./bigint.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./array.cjs"),l=require("./async-result.cjs"),i=require("./bigint.cjs"),a=require("./equal.cjs"),n=require("./function.cjs"),t=require("./number.cjs"),s=require("./object.cjs"),c=require("./promise.cjs"),p=require("./regexp.cjs"),o=require("./result-DzdZiQoR.cjs"),e=require("./string.cjs");exports.allElements=r.allElements;exports.anyElement=r.anyElement;exports.applyArrayDiffOperations=r.applyArrayDiffOperations;exports.areArraysEqual=r.areArraysEqual;exports.arrayDiffOperations=r.arrayDiffOperations;exports.arrayHasValues=r.arrayHasValues;exports.arrayHead=r.arrayHead;exports.arrayOfIterableIterator=r.arrayOfIterableIterator;exports.arrayTail=r.arrayTail;exports.compareArrays=r.compareArrays;exports.concatArrays=r.concatArrays;exports.createFilledArray=r.createFilledArray;exports.filterArray=r.filterArray;exports.filterMapArray=r.filterMapArray;exports.filterNullsFromArray=r.filterNullsFromArray;exports.flatMapArray=r.flatMapArray;exports.flattenArray=r.flattenArray;exports.foldLeftArray=r.foldLeftArray;exports.forEachElement=r.forEachElement;exports.generateArray=r.generateArray;exports.generateSequenceArray=r.generateSequenceArray;exports.isArrayEmpty=r.isArrayEmpty;exports.joinArrayWithConjunction=r.joinArrayWithConjunction;exports.mapArray=r.mapArray;exports.rankArray=r.rankArray;exports.removeAllFromArray=r.removeAllFromArray;exports.removeAllFromArrayByPredicate=r.removeAllFromArrayByPredicate;exports.removeOneFromArray=r.removeOneFromArray;exports.removeOneFromArrayByPredicate=r.removeOneFromArrayByPredicate;exports.sortArray=r.sortArray;exports.uniqueByPredicate=r.uniqueByPredicate;exports.uniquePrimitives=r.uniquePrimitives;exports.AsyncResult=l.AsyncResult;exports.biAbs=i.biAbs;exports.biCeilDiv=i.biCeilDiv;exports.biCompare=i.biCompare;exports.biFloorDiv=i.biFloorDiv;exports.biGcd=i.biGcd;exports.biIsEven=i.biIsEven;exports.biIsNegative=i.biIsNegative;exports.biIsOdd=i.biIsOdd;exports.biIsOne=i.biIsOne;exports.biIsPositive=i.biIsPositive;exports.biIsPrime=i.biIsPrime;exports.biIsZero=i.biIsZero;exports.biLcm=i.biLcm;exports.biMax=i.biMax;exports.biMin=i.biMin;exports.biNextPrime=i.biNextPrime;exports.biPow=i.biPow;exports.biPrevPrime=i.biPrevPrime;exports.deepEqual=a.deepEqual;exports.looseEqual=a.looseEqual;exports.strictEqual=a.strictEqual;exports.curryLeft=n.curryLeft;exports.identity=n.identity;exports.memoize=n.memoize;exports.EPSILON=t.EPSILON;exports.angleDifference=t.angleDifference;exports.ceilTo=t.ceilTo;exports.clamp=t.clamp;exports.clampInt=t.clampInt;exports.clampSym=t.clampSym;exports.compareNumbers=t.compareNumbers;exports.floorTo=t.floorTo;exports.interpolate=t.interpolate;exports.interpolateAngle=t.interpolateAngle;exports.interpolateAngleCCW=t.interpolateAngleCCW;exports.interpolateAngleCW=t.interpolateAngleCW;exports.interpolateWidestAngle=t.interpolateWidestAngle;exports.nearEqualAngles=t.nearEqualAngles;exports.nearEquals=t.nearEquals;exports.nearZero=t.nearZero;exports.root=t.root;exports.roundTo=t.roundTo;exports.sign=t.sign;exports.toHex=t.toHex;exports.widestAngleDifference=t.widestAngleDifference;exports.wrap=t.wrap;exports.wrapCircular=t.wrapCircular;exports.isEmptyObject=s.isEmptyObject;exports.isObject=s.isObject;exports.mergeObjects=s.mergeObjects;exports.objectKeys=s.objectKeys;exports.removeObjectFields=s.removeObjectFields;exports.sameObjectKeys=s.sameObjectKeys;exports.sleep=c.sleep;exports.mapRegExp=p.mapRegExp;exports.Result=o.Result;exports.Validation=o.Validation;exports.canonicalizeNewlines=e.canonicalizeNewlines;exports.capitalize=e.capitalize;exports.capitalizeWords=e.capitalizeWords;exports.chunkString=e.chunkString;exports.collapseText=e.collapseText;exports.compareCaseInsensitive=e.compareCaseInsensitive;exports.compareStrings=e.compareStrings;exports.containsAllText=e.containsAllText;exports.containsAllTextCaseInsensitive=e.containsAllTextCaseInsensitive;exports.containsAnyText=e.containsAnyText;exports.containsAnyTextCaseInsensitive=e.containsAnyTextCaseInsensitive;exports.countStringOccurrences=e.countStringOccurrences;exports.dasherize=e.dasherize;exports.decodeBase64=e.decodeBase64;exports.deleteFirstFromString=e.deleteFirstFromString;exports.deleteStringAfter=e.deleteStringAfter;exports.deleteStringBefore=e.deleteStringBefore;exports.deleteSubstring=e.deleteSubstring;exports.ellipsis=e.ellipsis;exports.ellipsisMiddle=e.ellipsisMiddle;exports.encodeBase64=e.encodeBase64;exports.filterCharcodes=e.filterCharcodes;exports.filterChars=e.filterChars;exports.humanize=e.humanize;exports.ifEmptyString=e.ifEmptyString;exports.isAlpha=e.isAlpha;exports.isAlphaNum=e.isAlphaNum;exports.isBreakingWhitespace=e.isBreakingWhitespace;exports.isDigitsOnly=e.isDigitsOnly;exports.isEmptyString=e.isEmptyString;exports.isLowerCase=e.isLowerCase;exports.isSpaceAt=e.isSpaceAt;exports.isUpperCase=e.isUpperCase;exports.jsQuote=e.jsQuote;exports.lowerCaseFirst=e.lowerCaseFirst;exports.lpad=e.lpad;exports.mapChars=e.mapChars;exports.quote=e.quote;exports.randomString=e.randomString;exports.randomStringSequence=e.randomStringSequence;exports.randomStringSequenceBase64=e.randomStringSequenceBase64;exports.repeatString=e.repeatString;exports.replaceAll=e.replaceAll;exports.reverseString=e.reverseString;exports.rpad=e.rpad;exports.smartQuote=e.smartQuote;exports.splitStringOnFirst=e.splitStringOnFirst;exports.splitStringOnLast=e.splitStringOnLast;exports.splitStringOnce=e.splitStringOnce;exports.stringContains=e.stringContains;exports.stringEndsWith=e.stringEndsWith;exports.stringEndsWithAny=e.stringEndsWithAny;exports.stringHasContent=e.stringHasContent;exports.stringHashCode=e.stringHashCode;exports.stringStartsWith=e.stringStartsWith;exports.stringStartsWithAny=e.stringStartsWithAny;exports.stringToCharcodes=e.stringToCharcodes;exports.stringToChars=e.stringToChars;exports.stringsDifferAtIndex=e.stringsDifferAtIndex;exports.substringAfter=e.substringAfter;exports.substringAfterLast=e.substringAfterLast;exports.substringBefore=e.substringBefore;exports.substringBeforeLast=e.substringBeforeLast;exports.surroundString=e.surroundString;exports.textContainsCaseInsensitive=e.textContainsCaseInsensitive;exports.textEndsWithAnyCaseInsensitive=e.textEndsWithAnyCaseInsensitive;exports.textEndsWithCaseInsensitive=e.textEndsWithCaseInsensitive;exports.textStartsWithAnyCaseInsensitive=e.textStartsWithAnyCaseInsensitive;exports.textStartsWithCaseInsensitive=e.textStartsWithCaseInsensitive;exports.textToLines=e.textToLines;exports.trimChars=e.trimChars;exports.trimCharsLeft=e.trimCharsLeft;exports.trimCharsRight=e.trimCharsRight;exports.trimStringSlice=e.trimStringSlice;exports.underscore=e.underscore;exports.upperCaseFirst=e.upperCaseFirst;exports.wrapColumns=e.wrapColumns;exports.wrapLine=e.wrapLine;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { allElements as t, anyElement as i, applyArrayDiffOperations as a, areArraysEqual as s, arrayDiffOperations as n, arrayHasValues as o, arrayHead as l, arrayOfIterableIterator as
|
|
2
|
-
import { AsyncResult as
|
|
1
|
+
import { allElements as t, anyElement as i, applyArrayDiffOperations as a, areArraysEqual as s, arrayDiffOperations as n, arrayHasValues as o, arrayHead as l, arrayOfIterableIterator as p, arrayTail as m, compareArrays as c, concatArrays as g, createFilledArray as y, filterArray as A, filterMapArray as d, filterNullsFromArray as f, flatMapArray as u, flattenArray as b, foldLeftArray as C, forEachElement as S, generateArray as x, generateSequenceArray as h, isArrayEmpty as v, joinArrayWithConjunction as E, mapArray as I, rankArray as O, removeAllFromArray as W, removeAllFromArrayByPredicate as F, removeOneFromArray as q, removeOneFromArrayByPredicate as T, sortArray as L, uniqueByPredicate as P, uniquePrimitives as B } from "./array.js";
|
|
2
|
+
import { AsyncResult as w } from "./async-result.js";
|
|
3
3
|
import { biAbs as N, biCeilDiv as z, biCompare as H, biFloorDiv as M, biGcd as R, biIsEven as k, biIsNegative as V, biIsOdd as K, biIsOne as Q, biIsPositive as Z, biIsPrime as G, biIsZero as U, biLcm as J, biMax as X, biMin as Y, biNextPrime as _, biPow as $, biPrevPrime as ee } from "./bigint.js";
|
|
4
4
|
import { deepEqual as te, looseEqual as ie, strictEqual as ae } from "./equal.js";
|
|
5
5
|
import { curryLeft as ne, identity as oe, memoize as le } from "./function.js";
|
|
6
|
-
import { EPSILON as
|
|
7
|
-
import { isEmptyObject as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { EPSILON as me, angleDifference as ce, ceilTo as ge, clamp as ye, clampInt as Ae, clampSym as de, compareNumbers as fe, floorTo as ue, interpolate as be, interpolateAngle as Ce, interpolateAngleCCW as Se, interpolateAngleCW as xe, interpolateWidestAngle as he, nearEqualAngles as ve, nearEquals as Ee, nearZero as Ie, root as Oe, roundTo as We, sign as Fe, toHex as qe, widestAngleDifference as Te, wrap as Le, wrapCircular as Pe } from "./number.js";
|
|
7
|
+
import { isEmptyObject as je, isObject as we, mergeObjects as De, objectKeys as Ne, removeObjectFields as ze, sameObjectKeys as He } from "./object.js";
|
|
8
|
+
import { sleep as Re } from "./promise.js";
|
|
9
|
+
import { mapRegExp as Ve } from "./regexp.js";
|
|
10
|
+
import { R as Qe, V as Ze } from "./result-Czm7RKNP.js";
|
|
11
|
+
import { canonicalizeNewlines as Ue, capitalize as Je, capitalizeWords as Xe, chunkString as Ye, collapseText as _e, compareCaseInsensitive as $e, compareStrings as er, containsAllText as rr, containsAllTextCaseInsensitive as tr, containsAnyText as ir, containsAnyTextCaseInsensitive as ar, countStringOccurrences as sr, dasherize as nr, decodeBase64 as or, deleteFirstFromString as lr, deleteStringAfter as pr, deleteStringBefore as mr, deleteSubstring as cr, ellipsis as gr, ellipsisMiddle as yr, encodeBase64 as Ar, filterCharcodes as dr, filterChars as fr, humanize as ur, ifEmptyString as br, isAlpha as Cr, isAlphaNum as Sr, isBreakingWhitespace as xr, isDigitsOnly as hr, isEmptyString as vr, isLowerCase as Er, isSpaceAt as Ir, isUpperCase as Or, jsQuote as Wr, lowerCaseFirst as Fr, lpad as qr, mapChars as Tr, quote as Lr, randomString as Pr, randomStringSequence as Br, randomStringSequenceBase64 as jr, repeatString as wr, replaceAll as Dr, reverseString as Nr, rpad as zr, smartQuote as Hr, splitStringOnFirst as Mr, splitStringOnLast as Rr, splitStringOnce as kr, stringContains as Vr, stringEndsWith as Kr, stringEndsWithAny as Qr, stringHasContent as Zr, stringHashCode as Gr, stringStartsWith as Ur, stringStartsWithAny as Jr, stringToCharcodes as Xr, stringToChars as Yr, stringsDifferAtIndex as _r, substringAfter as $r, substringAfterLast as et, substringBefore as rt, substringBeforeLast as tt, surroundString as it, textContainsCaseInsensitive as at, textEndsWithAnyCaseInsensitive as st, textEndsWithCaseInsensitive as nt, textStartsWithAnyCaseInsensitive as ot, textStartsWithCaseInsensitive as lt, textToLines as pt, trimChars as mt, trimCharsLeft as ct, trimCharsRight as gt, trimStringSlice as yt, underscore as At, upperCaseFirst as dt, wrapColumns as ft, wrapLine as ut } from "./string.js";
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Ze as afterLastText,
|
|
17
|
-
Ge as afterText,
|
|
13
|
+
w as AsyncResult,
|
|
14
|
+
me as EPSILON,
|
|
15
|
+
Qe as Result,
|
|
16
|
+
Ze as Validation,
|
|
18
17
|
t as allElements,
|
|
19
18
|
ce as angleDifference,
|
|
20
19
|
i as anyElement,
|
|
@@ -23,10 +22,8 @@ export {
|
|
|
23
22
|
n as arrayDiffOperations,
|
|
24
23
|
o as arrayHasValues,
|
|
25
24
|
l as arrayHead,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Ue as beforeLastText,
|
|
29
|
-
Je as beforeText,
|
|
25
|
+
p as arrayOfIterableIterator,
|
|
26
|
+
m as arrayTail,
|
|
30
27
|
N as biAbs,
|
|
31
28
|
z as biCeilDiv,
|
|
32
29
|
H as biCompare,
|
|
@@ -45,135 +42,140 @@ export {
|
|
|
45
42
|
_ as biNextPrime,
|
|
46
43
|
$ as biPow,
|
|
47
44
|
ee as biPrevPrime,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
Ue as canonicalizeNewlines,
|
|
46
|
+
Je as capitalize,
|
|
47
|
+
Xe as capitalizeWords,
|
|
48
|
+
ge as ceilTo,
|
|
49
|
+
Ye as chunkString,
|
|
50
|
+
ye as clamp,
|
|
51
|
+
Ae as clampInt,
|
|
55
52
|
de as clampSym,
|
|
53
|
+
_e as collapseText,
|
|
56
54
|
c as compareArrays,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
$e as compareCaseInsensitive,
|
|
56
|
+
fe as compareNumbers,
|
|
57
|
+
er as compareStrings,
|
|
58
|
+
g as concatArrays,
|
|
59
|
+
rr as containsAllText,
|
|
60
|
+
tr as containsAllTextCaseInsensitive,
|
|
61
|
+
ir as containsAnyText,
|
|
62
|
+
ar as containsAnyTextCaseInsensitive,
|
|
63
|
+
sr as countStringOccurrences,
|
|
64
|
+
y as createFilledArray,
|
|
67
65
|
ne as curryLeft,
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
nr as dasherize,
|
|
67
|
+
or as decodeBase64,
|
|
70
68
|
te as deepEqual,
|
|
71
|
-
|
|
72
|
-
pr as
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
lr as deleteFirstFromString,
|
|
70
|
+
pr as deleteStringAfter,
|
|
71
|
+
mr as deleteStringBefore,
|
|
72
|
+
cr as deleteSubstring,
|
|
73
|
+
gr as ellipsis,
|
|
74
|
+
yr as ellipsisMiddle,
|
|
75
|
+
Ar as encodeBase64,
|
|
76
|
+
A as filterArray,
|
|
77
|
+
dr as filterCharcodes,
|
|
78
|
+
fr as filterChars,
|
|
77
79
|
d as filterMapArray,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
ge as floorTo,
|
|
80
|
+
f as filterNullsFromArray,
|
|
81
|
+
u as flatMapArray,
|
|
82
|
+
b as flattenArray,
|
|
83
|
+
ue as floorTo,
|
|
83
84
|
C as foldLeftArray,
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
S as forEachElement,
|
|
86
|
+
x as generateArray,
|
|
86
87
|
h as generateSequenceArray,
|
|
87
|
-
|
|
88
|
+
ur as humanize,
|
|
88
89
|
oe as identity,
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
br as ifEmptyString,
|
|
91
|
+
be as interpolate,
|
|
91
92
|
Ce as interpolateAngle,
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
Se as interpolateAngleCCW,
|
|
94
|
+
xe as interpolateAngleCW,
|
|
94
95
|
he as interpolateWidestAngle,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
Cr as isAlpha,
|
|
97
|
+
Sr as isAlphaNum,
|
|
98
|
+
v as isArrayEmpty,
|
|
99
|
+
xr as isBreakingWhitespace,
|
|
100
|
+
hr as isDigitsOnly,
|
|
101
|
+
je as isEmptyObject,
|
|
101
102
|
vr as isEmptyString,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
Er as isLowerCase,
|
|
104
|
+
we as isObject,
|
|
105
|
+
Ir as isSpaceAt,
|
|
106
|
+
Or as isUpperCase,
|
|
106
107
|
E as joinArrayWithConjunction,
|
|
107
|
-
|
|
108
|
+
Wr as jsQuote,
|
|
108
109
|
ie as looseEqual,
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
Fr as lowerCaseFirst,
|
|
111
|
+
qr as lpad,
|
|
111
112
|
I as mapArray,
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
Tr as mapChars,
|
|
114
|
+
Ve as mapRegExp,
|
|
114
115
|
le as memoize,
|
|
115
116
|
De as mergeObjects,
|
|
116
|
-
|
|
117
|
+
ve as nearEqualAngles,
|
|
117
118
|
Ee as nearEquals,
|
|
118
119
|
Ie as nearZero,
|
|
119
120
|
Ne as objectKeys,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
Lr as quote,
|
|
122
|
+
Pr as randomString,
|
|
123
|
+
Br as randomStringSequence,
|
|
124
|
+
jr as randomStringSequenceBase64,
|
|
125
|
+
O as rankArray,
|
|
126
|
+
W as removeAllFromArray,
|
|
126
127
|
F as removeAllFromArrayByPredicate,
|
|
127
|
-
jr as removeFirstFromString,
|
|
128
|
-
wr as removeFromString,
|
|
129
|
-
Br as removeFromStringAfter,
|
|
130
|
-
Dr as removeFromStringBefore,
|
|
131
128
|
ze as removeObjectFields,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
Rr as rpad,
|
|
129
|
+
q as removeOneFromArray,
|
|
130
|
+
T as removeOneFromArrayByPredicate,
|
|
131
|
+
wr as repeatString,
|
|
132
|
+
Dr as replaceAll,
|
|
133
|
+
Nr as reverseString,
|
|
134
|
+
Oe as root,
|
|
135
|
+
We as roundTo,
|
|
136
|
+
zr as rpad,
|
|
141
137
|
He as sameObjectKeys,
|
|
142
138
|
Fe as sign,
|
|
143
|
-
|
|
139
|
+
Re as sleep,
|
|
140
|
+
Hr as smartQuote,
|
|
144
141
|
L as sortArray,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
Mr as splitStringOnFirst,
|
|
143
|
+
Rr as splitStringOnLast,
|
|
144
|
+
kr as splitStringOnce,
|
|
148
145
|
ae as strictEqual,
|
|
146
|
+
Vr as stringContains,
|
|
147
|
+
Kr as stringEndsWith,
|
|
148
|
+
Qr as stringEndsWithAny,
|
|
149
149
|
Zr as stringHasContent,
|
|
150
150
|
Gr as stringHashCode,
|
|
151
|
-
Ur as
|
|
152
|
-
Jr as
|
|
153
|
-
Xr as
|
|
154
|
-
Yr as
|
|
155
|
-
_r as
|
|
156
|
-
$r as
|
|
157
|
-
et as
|
|
158
|
-
rt as
|
|
159
|
-
tt as
|
|
160
|
-
it as
|
|
161
|
-
at as
|
|
162
|
-
st as
|
|
163
|
-
nt as
|
|
151
|
+
Ur as stringStartsWith,
|
|
152
|
+
Jr as stringStartsWithAny,
|
|
153
|
+
Xr as stringToCharcodes,
|
|
154
|
+
Yr as stringToChars,
|
|
155
|
+
_r as stringsDifferAtIndex,
|
|
156
|
+
$r as substringAfter,
|
|
157
|
+
et as substringAfterLast,
|
|
158
|
+
rt as substringBefore,
|
|
159
|
+
tt as substringBeforeLast,
|
|
160
|
+
it as surroundString,
|
|
161
|
+
at as textContainsCaseInsensitive,
|
|
162
|
+
st as textEndsWithAnyCaseInsensitive,
|
|
163
|
+
nt as textEndsWithCaseInsensitive,
|
|
164
164
|
ot as textStartsWithAnyCaseInsensitive,
|
|
165
165
|
lt as textStartsWithCaseInsensitive,
|
|
166
|
-
|
|
166
|
+
pt as textToLines,
|
|
167
|
+
qe as toHex,
|
|
167
168
|
mt as trimChars,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
yt as
|
|
169
|
+
ct as trimCharsLeft,
|
|
170
|
+
gt as trimCharsRight,
|
|
171
|
+
yt as trimStringSlice,
|
|
172
|
+
At as underscore,
|
|
171
173
|
P as uniqueByPredicate,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
B as uniquePrimitives,
|
|
175
|
+
dt as upperCaseFirst,
|
|
176
|
+
Te as widestAngleDifference,
|
|
175
177
|
Le as wrap,
|
|
176
178
|
Pe as wrapCircular,
|
|
177
179
|
ft as wrapColumns,
|
|
178
|
-
|
|
180
|
+
ut as wrapLine
|
|
179
181
|
};
|
package/number.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 p=require("./string.cjs"),i=1e-9,l=(e,t,n=360)=>{let r=(t-e)%n;return r<0&&(r+=n),r>n/2&&(r-=n),r},f=(e,t)=>{const n=Math.pow(10,t);return Math.ceil(e*n)/n},c=(e,t,n)=>Math.min(Math.max(e,t),n),g=(e,t,n)=>Math.trunc(c(e,t,n)),u=(e,t)=>c(e,-t,t),M=(e,t)=>e<t?-1:e>t?1:0,h=(e,t)=>{const n=Math.pow(10,t);return Math.floor(e*n)/n},A=(e,t=0)=>p.lpad(e.toString(16),"0",t),s=(e,t,n)=>(t-e)*n+e,d=(e,t,n,r=360)=>o(s(e,e+l(e,t,r),n),r),a=(e,t,n=360)=>{let r=(t-e)%n;return r<0&&(r+=n),r>n/2&&(r-=n),r},w=(e,t,n,r=360)=>o(s(e,e+a(e,t,r),n),r),N=(e,t,n,r=360)=>(e=o(e,r),t=o(t,r),t<e&&(t+=r),o(s(e,t,n),r)),m=(e,t,n,r=360)=>(e=o(e,r),t=o(t,r),t>e&&(t-=r),o(s(e,t,n),r)),C=(e,t,n=i)=>isFinite(e)?isFinite(t)?Math.abs(e-t)<=n:!1:isNaN(e)?isNaN(t):isNaN(t)||isFinite(t)?!1:e>0==t>0,S=(e,t,n=360,r=i)=>Math.abs(l(e,t,n))<=r,T=(e,t=i)=>Math.abs(e)<=t,E=(e,t)=>Math.pow(e,1/t),W=(e,t)=>{const n=Math.pow(10,t);return Math.round(e*n)/n},q=e=>e<0?-1:1,y=(e,t,n)=>{const r=n-t+1;return e<t&&(e+=r*((t-e)/r+1)),t+(e-t)%r},o=(e,t)=>(e=e%t,e<0&&(e+=t),e);exports.EPSILON=i;exports.angleDifference=l;exports.ceilTo=f;exports.clamp=c;exports.clampInt=g;exports.clampSym=u;exports.compareNumbers=M;exports.floorTo=h;exports.interpolate=s;exports.interpolateAngle=d;exports.interpolateAngleCCW=m;exports.interpolateAngleCW=N;exports.interpolateWidestAngle=w;exports.nearEqualAngles=S;exports.nearEquals=C;exports.nearZero=T;exports.root=E;exports.roundTo=W;exports.sign=q;exports.toHex=A;exports.widestAngleDifference=a;exports.wrap=y;exports.wrapCircular=o;
|