@tempots/std 0.10.7 → 0.12.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/domain.d.ts CHANGED
@@ -1,22 +1,166 @@
1
+ /**
2
+ * Represents a type that can either hold a value of type T or be undefined.
3
+ *
4
+ * @typeParam T - The type of the value that the Maybe type can hold.
5
+ * @public
6
+ */
7
+ export type Maybe<T> = T | undefined;
8
+ /**
9
+ * Represents a key type that can be used to index any object.
10
+ * @public
11
+ */
1
12
  export type IndexKey = keyof any;
13
+ /**
14
+ * Represents a primitive value that can be of type string, boolean, number, null, or undefined.
15
+ * @public
16
+ */
2
17
  export type Primitive = string | boolean | number | null | undefined;
18
+ /**
19
+ * Represents a value that can be either `undefined` or `null`.
20
+ * @public
21
+ */
3
22
  export type Nothing = undefined | null;
23
+ /**
24
+ * Represents a function that compares two values of type T and returns a number.
25
+ * The returned number indicates the relative order of the two values:
26
+ * - A negative number if `a` is less than `b`.
27
+ * - Zero if `a` is equal to `b`.
28
+ * - A positive number if `a` is greater than `b`.
29
+ *
30
+ * @typeParam T - The type of values being compared.
31
+ *
32
+ * @param a - The first value to compare.
33
+ * @param b - The second value to compare.
34
+ * @returns A number indicating the relative order of the two values.
35
+ * @public
36
+ */
4
37
  export type Compare<T> = (a: T, b: T) => number;
38
+ /**
39
+ * Represents an identity type that preserves the properties of the original type.
40
+ * @typeParam T - The original type.
41
+ * @public
42
+ */
5
43
  export type Id<T> = {} & {
6
44
  [P in keyof T]: T[P];
7
45
  };
46
+ /**
47
+ * Represents the type resulting from merging two types `A` and `B`.
48
+ * The resulting type is the intersection of `A` and `B`.
49
+ *
50
+ * @typeParam A - The first type to merge.
51
+ * @typeParam B - The second type to merge.
52
+ * @public
53
+ */
8
54
  export type Merge<A, B> = Id<A & B>;
9
- export type Sample = Merge<{
10
- a: number;
11
- }, {
12
- b: string;
13
- }>;
55
+ /**
56
+ * Converts a tuple type to a union type.
57
+ *
58
+ * @typeParam T - The tuple type to convert.
59
+ * @param T - The tuple to convert to a union.
60
+ * @returns The union type.
61
+ * @public
62
+ */
14
63
  export type TupleToUnion<T extends unknown[]> = T[number];
64
+ /**
65
+ * Represents a function that takes no arguments and returns a value of type `R`.
66
+ * @typeParam R - The return type of the function.
67
+ * @public
68
+ */
15
69
  export type Fun0<R> = () => R;
70
+ /**
71
+ * Represents a function that takes one argument of type `A` and returns a value of type `R`.
72
+ * @typeParam A - The type of the function argument.
73
+ * @typeParam R - The type of the function return value.
74
+ * @public
75
+ */
16
76
  export type Fun1<A, R> = (a: A) => R;
77
+ /**
78
+ * Represents a function that takes two arguments of types `A` and `B`, and returns a value of type `R`.
79
+ * @typeParam A - The type of the first argument.
80
+ * @typeParam B - The type of the second argument.
81
+ * @typeParam R - The type of the return value.
82
+ * @public
83
+ */
17
84
  export type Fun2<A, B, R> = (a: A, b: B) => R;
85
+ /**
86
+ * Represents a function that takes three arguments of types A, B, and C, and returns a value of type R.
87
+ *
88
+ * @typeParam A - The type of the first argument.
89
+ * @typeParam B - The type of the second argument.
90
+ * @typeParam C - The type of the third argument.
91
+ * @typeParam R - The type of the return value.
92
+ * @public
93
+ */
18
94
  export type Fun3<A, B, C, R> = (a: A, b: B, c: C) => R;
95
+ /**
96
+ * Represents a function that takes four arguments of types A, B, C, and D,
97
+ * and returns a value of type R.
98
+ *
99
+ * @typeParam A - The type of the first argument.
100
+ * @typeParam B - The type of the second argument.
101
+ * @typeParam C - The type of the third argument.
102
+ * @typeParam D - The type of the fourth argument.
103
+ * @typeParam R - The type of the return value.
104
+ * @public
105
+ */
19
106
  export type Fun4<A, B, C, D, R> = (a: A, b: B, c: C, d: D) => R;
107
+ /**
108
+ * Represents a function that takes five arguments of types A, B, C, D, and E,
109
+ * and returns a value of type R.
110
+ *
111
+ * @typeParam A - The type of the first argument.
112
+ * @typeParam B - The type of the second argument.
113
+ * @typeParam C - The type of the third argument.
114
+ * @typeParam D - The type of the fourth argument.
115
+ * @typeParam E - The type of the fifth argument.
116
+ * @typeParam R - The type of the return value.
117
+ * @public
118
+ */
20
119
  export type Fun5<A, B, C, D, E, R> = (a: A, b: B, c: C, d: D, e: E) => R;
120
+ /**
121
+ * Represents a function that takes six arguments of types A, B, C, D, E, F and returns a value of type R.
122
+ * @typeParam A - The type of the first argument.
123
+ * @typeParam B - The type of the second argument.
124
+ * @typeParam C - The type of the third argument.
125
+ * @typeParam D - The type of the fourth argument.
126
+ * @typeParam E - The type of the fifth argument.
127
+ * @typeParam F - The type of the sixth argument.
128
+ * @typeParam R - The type of the return value.
129
+ * @public
130
+ */
21
131
  export type Fun6<A, B, C, D, E, F, R> = (a: A, b: B, c: C, d: D, e: E, f: F) => R;
132
+ /**
133
+ * Extracts the first argument type from a function type.
134
+ * @typeParam F - The function type.
135
+ * @returns The type of the first argument of the function type.
136
+ * @public
137
+ */
22
138
  export type FirstArgument<F> = F extends Fun1<infer A, unknown> ? A : never;
139
+ /**
140
+ * Filters out elements from a tuple that are equal to the specified type.
141
+ *
142
+ * @typeParam T - The input tuple.
143
+ * @typeParam N - The type to filter out from the tuple.
144
+ * @param T - The input tuple.
145
+ * @returns The filtered tuple.
146
+ * @public
147
+ */
148
+ export type FilterTuple<T extends unknown[], N> = T extends [] ? [] : T extends [infer H, ...infer R] ? N extends H ? FilterTuple<R, N> : [H, ...FilterTuple<R, N>] : T;
149
+ /**
150
+ * Splits a string literal type `T` by a specified delimiter `SplitBy`.
151
+ * Returns a tuple containing the split parts of the string.
152
+ *
153
+ * @typeParam T - The string literal type to split.
154
+ * @typeParam SplitBy - The delimiter to split the string by.
155
+ * @returns A tuple containing the split parts of the string.
156
+ * @public
157
+ */
158
+ export type SplitLiteral<T extends string, SplitBy extends string> = FilterTuple<T extends `${infer A}${SplitBy}${infer B}` ? [...SplitLiteral<A, SplitBy>, ...SplitLiteral<B, SplitBy>] : [T], ''>;
159
+ /**
160
+ * Converts a string literal type `T` into a union type by splitting it using the specified delimiter `SplitBy`.
161
+ * @typeParam T - The string literal type to split.
162
+ * @typeParam SplitBy - The delimiter used to split the string literal type.
163
+ * @returns A union type representing the split values of the string literal type.
164
+ * @public
165
+ */
166
+ export type SplitLiteralToUnion<T extends string, SplitBy extends string> = TupleToUnion<SplitLiteral<T, SplitBy>>;
package/equal.d.ts CHANGED
@@ -1,3 +1,29 @@
1
+ /**
2
+ * Checks if two values are strictly equal.
3
+ *
4
+ * @typeParam A - The type of the values to compare.
5
+ * @param a - The first value to compare.
6
+ * @param b - The second value to compare.
7
+ * @returns `true` if the values are strictly equal, `false` otherwise.
8
+ * @public
9
+ */
1
10
  export declare function strictEqual<A>(a: A, b: A): boolean;
11
+ /**
12
+ * Checks if two values are equal by comparing their contents.
13
+ *
14
+ * @typeParam A - The type of the values being compared.
15
+ * @param a - The first value to compare.
16
+ * @param b - The second value to compare.
17
+ * @returns `true` if the values are deeply equal, `false` otherwise.
18
+ * @public
19
+ */
2
20
  export declare function deepEqual<A>(a: A, b: A): boolean;
21
+ /**
22
+ * Checks if two values are loosely equal.
23
+ *
24
+ * @param a - The first value to compare.
25
+ * @param b - The second value to compare.
26
+ * @returns `true` if the values are loosely equal, `false` otherwise.
27
+ * @public
28
+ */
3
29
  export declare function looseEqual<T>(a: T, b: T): boolean;
package/function.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(...e){return r=>e.reduce((t,n)=>n(t),r)}function u(e){return e}function o(e){return r=>(...t)=>e(r,...t)}function c(e){return(...r)=>t=>e(...r.concat([t]))}function f(e){return(...r)=>e(...r.reverse())}function d(e){return e}function y(e){let r;return()=>(r===void 0&&(r=e()),r)}exports.compose=i;exports.curryLeft=o;exports.curryRight=c;exports.flip=f;exports.id=d;exports.identity=u;exports.memoize=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function u(...e){return r=>e.reduce((t,n)=>n(t),r)}function i(e){return e}function o(e){return r=>(...t)=>e(r,...t)}function c(e){return(...r)=>t=>e(...r.concat([t]))}function f(e){return(...r)=>e(...r.reverse())}function y(e){let r;return()=>(r===void 0&&(r=e()),r)}exports.compose=u;exports.curryLeft=o;exports.curryRight=c;exports.flip=f;exports.identity=i;exports.memoize=y;
package/function.d.ts CHANGED
@@ -5,7 +5,22 @@ export declare function compose<A, B, C, D>(f1: (a: A) => B, f2: (b: B) => C, f3
5
5
  export declare function compose<A, B, C, D, E>(f1: (a: A) => B, f2: (b: B) => C, f3: (c: C) => D, f4: (d: D) => E): (a: A) => E;
6
6
  export declare function compose<A, B, C, D, E, F>(f1: (a: A) => B, f2: (b: B) => C, f3: (c: C) => D, f4: (d: D) => E, f5: (e: E) => F): (a: A) => F;
7
7
  export declare function compose<A, B, C, D, E, F, G>(f1: (a: A) => B, f2: (b: B) => C, f3: (c: C) => D, f4: (d: D) => E, f5: (e: E) => F, f6: (f: F) => G): (a: A) => G;
8
+ /**
9
+ * Returns the input value as is.
10
+ *
11
+ * @param v - The value to be returned.
12
+ * @returns The input value.
13
+ * @typeParam T - The type of the input value.
14
+ * @public
15
+ */
8
16
  export declare function identity<T>(v: T): T;
17
+ /**
18
+ * Curries a function from left to right.
19
+ *
20
+ * @param f - The function to curry.
21
+ * @returns A curried function.
22
+ * @public
23
+ */
9
24
  export declare function curryLeft<A, Rest extends any[], Ret>(f: (a: A, ...rest: Rest) => Ret): (a: A) => (...rest: Rest) => Ret;
10
25
  export declare function curryRight<A, B, C, D>(f: (a: A, b: B, c: C) => D): (a: A, b: B) => (c: C) => D;
11
26
  export declare function curryRight<A, B, C, D, E>(f: (a: A, b: B, c: C, d: D) => E): (a: A, b: B, c: C) => (d: D) => E;
@@ -17,5 +32,13 @@ export declare function flip<A, B, C, D, E>(f: (a: A, b: B, c: C, d: D) => E): (
17
32
  export declare function flip<A, B, C, D, E>(f: (a: A, b: B, c: C, d: D) => E): (d: D, c: C, b: B, a: A) => E;
18
33
  export declare function flip<A, B, C, D, E, F>(f: (a: A, b: B, c: C, d: D, e: E) => F): (e: E, d: D, c: C, b: B, a: A) => F;
19
34
  export declare function flip<A, B, C, D, E, F, G>(f: (a: A, b: B, c: C, d: D, e: E, f: F) => G): (f: F, e: E, d: D, c: C, b: B, a: A) => G;
20
- export declare function id<T>(v: T): T;
35
+ /**
36
+ * Memoizes the result of a function and returns a new function that caches the result.
37
+ * The cached result is returned if available, otherwise the original function is called
38
+ * and the result is cached for future invocations.
39
+ *
40
+ * @param f - The function to memoize.
41
+ * @returns A new function that caches the result of the original function.
42
+ * @public
43
+ */
21
44
  export declare function memoize<T>(f: () => NonNullable<T>): () => NonNullable<T>;
package/function.js CHANGED
@@ -1,34 +1,30 @@
1
- function u(...n) {
2
- return (r) => n.reduce((t, e) => e(t), r);
1
+ function u(...r) {
2
+ return (n) => r.reduce((e, t) => t(e), n);
3
3
  }
4
- function i(n) {
5
- return n;
4
+ function i(r) {
5
+ return r;
6
6
  }
7
- function c(n) {
8
- return (r) => (...t) => n(r, ...t);
7
+ function c(r) {
8
+ return (n) => (...e) => r(n, ...e);
9
9
  }
10
- function o(n) {
11
- return (...r) => (
10
+ function o(r) {
11
+ return (...n) => (
12
12
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- (t) => n(...r.concat([t]))
13
+ (e) => r(...n.concat([e]))
14
14
  );
15
15
  }
16
- function f(n) {
17
- return (...r) => n(...r.reverse());
16
+ function f(r) {
17
+ return (...n) => r(...n.reverse());
18
18
  }
19
- function d(n) {
20
- return n;
21
- }
22
- function l(n) {
23
- let r;
24
- return () => (r === void 0 && (r = n()), r);
19
+ function d(r) {
20
+ let n;
21
+ return () => (n === void 0 && (n = r()), n);
25
22
  }
26
23
  export {
27
24
  u as compose,
28
25
  c as curryLeft,
29
26
  o as curryRight,
30
27
  f as flip,
31
- d as id,
32
28
  i as identity,
33
- l as memoize
29
+ d as memoize
34
30
  };
package/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./array.cjs"),l=require("./async-result.cjs"),i=require("./bigint.cjs"),n=require("./equal.cjs"),t=require("./function.cjs"),a=require("./number.cjs"),s=require("./object.cjs"),c=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=n.deepEqual;exports.looseEqual=n.looseEqual;exports.strictEqual=n.strictEqual;exports.compose=t.compose;exports.curryLeft=t.curryLeft;exports.curryRight=t.curryRight;exports.flip=t.flip;exports.identity=t.identity;exports.memoize=t.memoize;exports.EPSILON=a.EPSILON;exports.TOLERANCE=a.TOLERANCE;exports.angleDifference=a.angleDifference;exports.ceilTo=a.ceilTo;exports.clamp=a.clamp;exports.clampInt=a.clampInt;exports.clampSym=a.clampSym;exports.compare=a.compare;exports.floorTo=a.floorTo;exports.interpolate=a.interpolate;exports.interpolateAngle=a.interpolateAngle;exports.interpolateAngleCCW=a.interpolateAngleCCW;exports.interpolateAngleCW=a.interpolateAngleCW;exports.interpolateWidestAngle=a.interpolateWidestAngle;exports.nearEqualAngles=a.nearEqualAngles;exports.nearEquals=a.nearEquals;exports.nearZero=a.nearZero;exports.root=a.root;exports.roundTo=a.roundTo;exports.sign=a.sign;exports.toHex=a.toHex;exports.widestAngleDifference=a.widestAngleDifference;exports.wrap=a.wrap;exports.wrapCircular=a.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.mapRegExp=c.mapRegExp;exports.Result=o.Result;exports.Validation=o.Validation;exports.after=e.after;exports.afterLast=e.afterLast;exports.before=e.before;exports.beforeLast=e.beforeLast;exports.canonicalizeNewlines=e.canonicalizeNewlines;exports.capitalize=e.capitalize;exports.capitalizeWords=e.capitalizeWords;exports.collapse=e.collapse;exports.compareCaseInsensitive=e.compareCaseInsensitive;exports.compareStrings=e.compareStrings;exports.contains=e.contains;exports.containsAll=e.containsAll;exports.containsAllCaseInsensitive=e.containsAllCaseInsensitive;exports.containsAny=e.containsAny;exports.containsAnyCaseInsensitive=e.containsAnyCaseInsensitive;exports.containsCaseInsensitive=e.containsCaseInsensitive;exports.count=e.count;exports.dasherize=e.dasherize;exports.decodeBase64=e.decodeBase64;exports.diffIndex=e.diffIndex;exports.ellipsis=e.ellipsis;exports.ellipsisMiddle=e.ellipsisMiddle;exports.encodeBase64=e.encodeBase64;exports.endsWith=e.endsWith;exports.endsWithAny=e.endsWithAny;exports.endsWithAnyCaseInsensitive=e.endsWithAnyCaseInsensitive;exports.endsWithCaseInsensitive=e.endsWithCaseInsensitive;exports.filter=e.filter;exports.filterCharcode=e.filterCharcode;exports.from=e.from;exports.hasContent=e.hasContent;exports.hashCode=e.hashCode;exports.humanize=e.humanize;exports.ifEmpty=e.ifEmpty;exports.isAlpha=e.isAlpha;exports.isAlphaNum=e.isAlphaNum;exports.isBreakingWhitespace=e.isBreakingWhitespace;exports.isDigitsOnly=e.isDigitsOnly;exports.isEmpty=e.isEmpty;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.map=e.map;exports.quote=e.quote;exports.random=e.random;exports.randomSequence=e.randomSequence;exports.randomSequence64=e.randomSequence64;exports.remove=e.remove;exports.removeAfter=e.removeAfter;exports.removeAt=e.removeAt;exports.removeBefore=e.removeBefore;exports.removeOne=e.removeOne;exports.repeat=e.repeat;exports.replace=e.replace;exports.reverse=e.reverse;exports.rpad=e.rpad;exports.smartQuote=e.smartQuote;exports.splitOnFirst=e.splitOnFirst;exports.splitOnLast=e.splitOnLast;exports.splitOnce=e.splitOnce;exports.startsWith=e.startsWith;exports.startsWithAny=e.startsWithAny;exports.startsWithAnyCaseInsensitive=e.startsWithAnyCaseInsensitive;exports.startsWithCaseInsensitive=e.startsWithCaseInsensitive;exports.surround=e.surround;exports.toArray=e.toArray;exports.toCharcodes=e.toCharcodes;exports.toChunks=e.toChunks;exports.toLines=e.toLines;exports.trimChars=e.trimChars;exports.trimCharsLeft=e.trimCharsLeft;exports.trimCharsRight=e.trimCharsRight;exports.underscore=e.underscore;exports.upTo=e.upTo;exports.upperCaseFirst=e.upperCaseFirst;exports.wrapColumns=e.wrapColumns;exports.wrapLine=e.wrapLine;
package/index.d.ts CHANGED
@@ -0,0 +1,13 @@
1
+ export * from './array';
2
+ export * from './async-result';
3
+ export * from './bigint';
4
+ export * from './domain';
5
+ export * from './equal';
6
+ export * from './function';
7
+ export * from './json';
8
+ export * from './number';
9
+ export * from './object';
10
+ export * from './regexp';
11
+ export * from './result';
12
+ export * from './string';
13
+ export * from './validation';
package/index.js CHANGED
@@ -1 +1,185 @@
1
-
1
+ import { allElements as a, anyElement as i, applyArrayDiffOperations as t, areArraysEqual as s, arrayDiffOperations as o, arrayHasValues as n, arrayHead as l, arrayOfIterableIterator as m, arrayTail as p, compareArrays as c, concatArrays as y, createFilledArray as A, filterArray as f, filterMapArray as d, filterNullsFromArray as u, flatMapArray as C, flattenArray as b, foldLeftArray as h, forEachElement as v, generateArray as I, generateSequenceArray as E, isArrayEmpty as O, joinArrayWithConjunction as g, mapArray as x, rankArray as W, removeAllFromArray as q, removeAllFromArrayByPredicate as L, removeOneFromArray as F, removeOneFromArrayByPredicate as P, sortArray as j, uniqueByPredicate as w, uniquePrimitives as B } from "./array.js";
2
+ import { AsyncResult as N } from "./async-result.js";
3
+ import { biAbs as S, biCeilDiv as z, biCompare as T, biFloorDiv as M, biGcd as k, biIsEven as H, 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
+ import { deepEqual as ae, looseEqual as ie, strictEqual as te } from "./equal.js";
5
+ import { compose as oe, curryLeft as ne, curryRight as le, flip as me, identity as pe, memoize as ce } from "./function.js";
6
+ import { EPSILON as Ae, TOLERANCE as fe, angleDifference as de, ceilTo as ue, clamp as Ce, clampInt as be, clampSym as he, compare as ve, floorTo as Ie, interpolate as Ee, interpolateAngle as Oe, interpolateAngleCCW as ge, interpolateAngleCW as xe, interpolateWidestAngle as We, nearEqualAngles as qe, nearEquals as Le, nearZero as Fe, root as Pe, roundTo as je, sign as we, toHex as Be, widestAngleDifference as De, wrap as Ne, wrapCircular as Re } from "./number.js";
7
+ import { isEmptyObject as ze, isObject as Te, mergeObjects as Me, objectKeys as ke, removeObjectFields as He, sameObjectKeys as Ve } from "./object.js";
8
+ import { mapRegExp as Qe } from "./regexp.js";
9
+ import { R as Ge, V as Ue } from "./result-Czm7RKNP.js";
10
+ import { after as Xe, afterLast as Ye, before as _e, beforeLast as $e, canonicalizeNewlines as er, capitalize as rr, capitalizeWords as ar, collapse as ir, compareCaseInsensitive as tr, compareStrings as sr, contains as or, containsAll as nr, containsAllCaseInsensitive as lr, containsAny as mr, containsAnyCaseInsensitive as pr, containsCaseInsensitive as cr, count as yr, dasherize as Ar, decodeBase64 as fr, diffIndex as dr, ellipsis as ur, ellipsisMiddle as Cr, encodeBase64 as br, endsWith as hr, endsWithAny as vr, endsWithAnyCaseInsensitive as Ir, endsWithCaseInsensitive as Er, filter as Or, filterCharcode as gr, from as xr, hasContent as Wr, hashCode as qr, humanize as Lr, ifEmpty as Fr, isAlpha as Pr, isAlphaNum as jr, isBreakingWhitespace as wr, isDigitsOnly as Br, isEmpty as Dr, isLowerCase as Nr, isSpaceAt as Rr, isUpperCase as Sr, jsQuote as zr, lowerCaseFirst as Tr, lpad as Mr, map as kr, quote as Hr, random as Vr, randomSequence as Kr, randomSequence64 as Qr, remove as Zr, removeAfter as Gr, removeAt as Ur, removeBefore as Jr, removeOne as Xr, repeat as Yr, replace as _r, reverse as $r, rpad as ea, smartQuote as ra, splitOnFirst as aa, splitOnLast as ia, splitOnce as ta, startsWith as sa, startsWithAny as oa, startsWithAnyCaseInsensitive as na, startsWithCaseInsensitive as la, surround as ma, toArray as pa, toCharcodes as ca, toChunks as ya, toLines as Aa, trimChars as fa, trimCharsLeft as da, trimCharsRight as ua, underscore as Ca, upTo as ba, upperCaseFirst as ha, wrapColumns as va, wrapLine as Ia } from "./string.js";
11
+ export {
12
+ N as AsyncResult,
13
+ Ae as EPSILON,
14
+ Ge as Result,
15
+ fe as TOLERANCE,
16
+ Ue as Validation,
17
+ Xe as after,
18
+ Ye as afterLast,
19
+ a as allElements,
20
+ de as angleDifference,
21
+ i as anyElement,
22
+ t as applyArrayDiffOperations,
23
+ s as areArraysEqual,
24
+ o as arrayDiffOperations,
25
+ n as arrayHasValues,
26
+ l as arrayHead,
27
+ m as arrayOfIterableIterator,
28
+ p as arrayTail,
29
+ _e as before,
30
+ $e as beforeLast,
31
+ S as biAbs,
32
+ z as biCeilDiv,
33
+ T as biCompare,
34
+ M as biFloorDiv,
35
+ k as biGcd,
36
+ H as biIsEven,
37
+ V as biIsNegative,
38
+ K as biIsOdd,
39
+ Q as biIsOne,
40
+ Z as biIsPositive,
41
+ G as biIsPrime,
42
+ U as biIsZero,
43
+ J as biLcm,
44
+ X as biMax,
45
+ Y as biMin,
46
+ _ as biNextPrime,
47
+ $ as biPow,
48
+ ee as biPrevPrime,
49
+ er as canonicalizeNewlines,
50
+ rr as capitalize,
51
+ ar as capitalizeWords,
52
+ ue as ceilTo,
53
+ Ce as clamp,
54
+ be as clampInt,
55
+ he as clampSym,
56
+ ir as collapse,
57
+ ve as compare,
58
+ c as compareArrays,
59
+ tr as compareCaseInsensitive,
60
+ sr as compareStrings,
61
+ oe as compose,
62
+ y as concatArrays,
63
+ or as contains,
64
+ nr as containsAll,
65
+ lr as containsAllCaseInsensitive,
66
+ mr as containsAny,
67
+ pr as containsAnyCaseInsensitive,
68
+ cr as containsCaseInsensitive,
69
+ yr as count,
70
+ A as createFilledArray,
71
+ ne as curryLeft,
72
+ le as curryRight,
73
+ Ar as dasherize,
74
+ fr as decodeBase64,
75
+ ae as deepEqual,
76
+ dr as diffIndex,
77
+ ur as ellipsis,
78
+ Cr as ellipsisMiddle,
79
+ br as encodeBase64,
80
+ hr as endsWith,
81
+ vr as endsWithAny,
82
+ Ir as endsWithAnyCaseInsensitive,
83
+ Er as endsWithCaseInsensitive,
84
+ Or as filter,
85
+ f as filterArray,
86
+ gr as filterCharcode,
87
+ d as filterMapArray,
88
+ u as filterNullsFromArray,
89
+ C as flatMapArray,
90
+ b as flattenArray,
91
+ me as flip,
92
+ Ie as floorTo,
93
+ h as foldLeftArray,
94
+ v as forEachElement,
95
+ xr as from,
96
+ I as generateArray,
97
+ E as generateSequenceArray,
98
+ Wr as hasContent,
99
+ qr as hashCode,
100
+ Lr as humanize,
101
+ pe as identity,
102
+ Fr as ifEmpty,
103
+ Ee as interpolate,
104
+ Oe as interpolateAngle,
105
+ ge as interpolateAngleCCW,
106
+ xe as interpolateAngleCW,
107
+ We as interpolateWidestAngle,
108
+ Pr as isAlpha,
109
+ jr as isAlphaNum,
110
+ O as isArrayEmpty,
111
+ wr as isBreakingWhitespace,
112
+ Br as isDigitsOnly,
113
+ Dr as isEmpty,
114
+ ze as isEmptyObject,
115
+ Nr as isLowerCase,
116
+ Te as isObject,
117
+ Rr as isSpaceAt,
118
+ Sr as isUpperCase,
119
+ g as joinArrayWithConjunction,
120
+ zr as jsQuote,
121
+ ie as looseEqual,
122
+ Tr as lowerCaseFirst,
123
+ Mr as lpad,
124
+ kr as map,
125
+ x as mapArray,
126
+ Qe as mapRegExp,
127
+ ce as memoize,
128
+ Me as mergeObjects,
129
+ qe as nearEqualAngles,
130
+ Le as nearEquals,
131
+ Fe as nearZero,
132
+ ke as objectKeys,
133
+ Hr as quote,
134
+ Vr as random,
135
+ Kr as randomSequence,
136
+ Qr as randomSequence64,
137
+ W as rankArray,
138
+ Zr as remove,
139
+ Gr as removeAfter,
140
+ q as removeAllFromArray,
141
+ L as removeAllFromArrayByPredicate,
142
+ Ur as removeAt,
143
+ Jr as removeBefore,
144
+ He as removeObjectFields,
145
+ Xr as removeOne,
146
+ F as removeOneFromArray,
147
+ P as removeOneFromArrayByPredicate,
148
+ Yr as repeat,
149
+ _r as replace,
150
+ $r as reverse,
151
+ Pe as root,
152
+ je as roundTo,
153
+ ea as rpad,
154
+ Ve as sameObjectKeys,
155
+ we as sign,
156
+ ra as smartQuote,
157
+ j as sortArray,
158
+ aa as splitOnFirst,
159
+ ia as splitOnLast,
160
+ ta as splitOnce,
161
+ sa as startsWith,
162
+ oa as startsWithAny,
163
+ na as startsWithAnyCaseInsensitive,
164
+ la as startsWithCaseInsensitive,
165
+ te as strictEqual,
166
+ ma as surround,
167
+ pa as toArray,
168
+ ca as toCharcodes,
169
+ ya as toChunks,
170
+ Be as toHex,
171
+ Aa as toLines,
172
+ fa as trimChars,
173
+ da as trimCharsLeft,
174
+ ua as trimCharsRight,
175
+ Ca as underscore,
176
+ w as uniqueByPredicate,
177
+ B as uniquePrimitives,
178
+ ba as upTo,
179
+ ha as upperCaseFirst,
180
+ De as widestAngleDifference,
181
+ Ne as wrap,
182
+ Re as wrapCircular,
183
+ va as wrapColumns,
184
+ Ia as wrapLine
185
+ };
package/json.d.ts CHANGED
@@ -1,6 +1,25 @@
1
- export type JSONPrimitive = string | boolean | number | null | undefined;
1
+ import { Nothing } from './domain';
2
+
3
+ /**
4
+ * Represents a JSON primitive value.
5
+ * It can be a string, boolean, number, or Nothing (null or undefined).
6
+ * @public
7
+ */
8
+ export type JSONPrimitive = string | boolean | number | Nothing;
9
+ /**
10
+ * Represents a JSON object.
11
+ * @public
12
+ */
2
13
  export interface JSONObject {
3
14
  [k: string]: JSONValue;
4
15
  }
16
+ /**
17
+ * Represents an array of JSON values.
18
+ * @public
19
+ */
5
20
  export type JSONArray = JSONValue[];
21
+ /**
22
+ * Represents a JSON value, which can be a primitive, an object, or an array.
23
+ * @public
24
+ */
6
25
  export type JSONValue = JSONPrimitive | JSONObject | JSONArray;