@tspro/ts-utils-lib 2.1.0 → 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/CHANGELOG.md +13 -6
- package/LICENSE +1 -1
- package/README.md +12 -15
- package/dist/index.d.mts +70 -7
- package/dist/index.d.ts +70 -7
- package/dist/index.es5.iife.js +1 -1
- package/dist/index.es5.polyfilled.iife.js +1 -1
- package/dist/index.js +94 -19
- package/dist/index.mjs +94 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## [2.2.0] - 2025-11-08
|
|
3
|
+
### Added
|
|
4
|
+
- Some Guard and Assert isNumberX() functions.
|
|
5
|
+
- Utils.Str.splitByCaps()
|
|
6
|
+
- Utils.Str.splitByStrings()
|
|
7
|
+
- Utils.Str.splitByChars()
|
|
8
|
+
|
|
2
9
|
## [2.1.0] - 2025-11-01
|
|
3
10
|
### Added
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
- Bundle ``index.es5.iife.js`
|
|
12
|
+
- Bundle `index.es5.polyfilled.iife.js`
|
|
13
|
+
- `AnchoredRect.toString()`
|
|
14
|
+
- `Utils.Str.stringify()`: detect custom `toString()`.
|
|
15
|
+
- `Utils.Str.stringify()`: detect constructor name.
|
|
16
|
+
- `getLibInfo()` (name, version, bundle format).
|
|
10
17
|
|
|
11
18
|
## [2.0.0] - 2025-10-31
|
|
12
19
|
### **Breaking Major Update**
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -30,23 +30,20 @@ const map = new UniMap();
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Browser Usage
|
|
33
|
-
Available in version `2.1.0`.
|
|
33
|
+
- Available in version `2.1.0`.
|
|
34
|
+
- These bundles are transpiled with `ES5` target.
|
|
35
|
+
- With non-polyfilled versions you can use option to your own polyfilling choise.
|
|
34
36
|
|
|
35
37
|
```html
|
|
36
|
-
<!--
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<script src="https://cdn.jsdelivr.net/npm/@tspro/ts-utils-lib@2.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-->
|
|
46
|
-
<script src="https://unpkg.com/@tspro/ts-utils-lib@2.1.0/dist/index.es5.polyfilled.iife.js"></script>
|
|
47
|
-
<script src="https://cdn.jsdelivr.net/npm/@tspro/ts-utils-lib@2.1.0/dist/index.es5.polyfilled.iife.js"></script>
|
|
48
|
-
|
|
49
|
-
<!-- Another JS example: -->
|
|
38
|
+
<!-- Load non-polyfilled or polyfilled bundles on unpkg cdn -->
|
|
39
|
+
<script src="https://unpkg.com/@tspro/ts-utils-lib@2.2.0/dist/index.es5.iife.js"></script>
|
|
40
|
+
<script src="https://unpkg.com/@tspro/ts-utils-lib@2.2.0/dist/index.es5.polyfilled.iife.js"></script>
|
|
41
|
+
|
|
42
|
+
<!-- Load non-polyfilled or polyfilled bundles on jsdelivr cdn -->
|
|
43
|
+
<script src="https://cdn.jsdelivr.net/npm/@tspro/ts-utils-lib@2.2.0/dist/index.es5.iife.js"></script>
|
|
44
|
+
<script src="https://cdn.jsdelivr.net/npm/@tspro/ts-utils-lib@2.2.0/dist/index.es5.polyfilled.iife.js"></script>
|
|
45
|
+
|
|
46
|
+
<!-- JS example: -->
|
|
50
47
|
<script>
|
|
51
48
|
const { UniMap, Utils } = window.TsUtilsLib;
|
|
52
49
|
const map = new UniMap();
|
package/dist/index.d.mts
CHANGED
|
@@ -63,7 +63,15 @@ declare function isEnumValueOrUndefined$1<E extends EnumObject>(val: unknown, en
|
|
|
63
63
|
declare function isNumericString$1(val: unknown, msg?: string): string;
|
|
64
64
|
declare function isBigInt$1(val: unknown, msg?: string): BigInt;
|
|
65
65
|
declare function isNumber$1(val: unknown, msg?: string): number;
|
|
66
|
+
declare function isSafeNumber$1(val: unknown, msg?: string): number;
|
|
66
67
|
declare function isNumberOrUndefined$1(val: unknown, msg?: string): number | undefined;
|
|
68
|
+
declare function isNumberEq$1(val: unknown, ref: unknown, msg?: string): number;
|
|
69
|
+
declare function isNumberGt$1(val: unknown, ref: unknown, msg?: string): number;
|
|
70
|
+
declare function isNumberGte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
71
|
+
declare function isNumberLt$1(val: unknown, ref: unknown, msg?: string): number;
|
|
72
|
+
declare function isNumberLte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
73
|
+
declare function isNumberBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
74
|
+
declare function isNumberBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
67
75
|
declare function isFinite$1(val: unknown, msg?: string): number;
|
|
68
76
|
declare function isFloat$1(val: unknown, msg?: string): number;
|
|
69
77
|
declare function isInteger$1(val: unknown, msg?: string): number;
|
|
@@ -76,8 +84,6 @@ declare function isIntegerLt$1(val: unknown, ref: unknown, msg?: string): number
|
|
|
76
84
|
declare function isIntegerLte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
77
85
|
declare function isIntegerBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
78
86
|
declare function isIntegerBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
79
|
-
declare function isNumberBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
80
|
-
declare function isNumberBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
81
87
|
declare function isNaNValue$1(val: unknown, msg?: string): number;
|
|
82
88
|
declare function isInfinity$1(val: unknown, msg?: string): number;
|
|
83
89
|
declare function isPosInfinity$1(val: unknown, msg?: string): number;
|
|
@@ -107,7 +113,7 @@ declare const index$7_requireDefined: typeof requireDefined;
|
|
|
107
113
|
declare const index$7_requireElement: typeof requireElement;
|
|
108
114
|
declare const index$7_setErrorClass: typeof setErrorClass;
|
|
109
115
|
declare namespace index$7 {
|
|
110
|
-
export { type index$7_ErrorConstructor as ErrorConstructor, index$7_assert as assert, doesNotThrow$1 as doesNotThrow, doesThrow$1 as doesThrow, index$7_fail as fail, isArray$1 as isArray, isArrayOrUndefined$1 as isArrayOrUndefined, isBigInt$1 as isBigInt, isBoolean$1 as isBoolean, isBooleanOrUndefined$1 as isBooleanOrUndefined, isDeepEqual$1 as isDeepEqual, isDefined$1 as isDefined, isEmptyArray$1 as isEmptyArray, isEmptyArrayOrUndefined$1 as isEmptyArrayOrUndefined, isEmptyObject$1 as isEmptyObject, isEmptyString$1 as isEmptyString, isEmptyStringOrUndefined$1 as isEmptyStringOrUndefined, isEnumValue$1 as isEnumValue, isEnumValueOrUndefined$1 as isEnumValueOrUndefined, isEven$1 as isEven, isFalse$1 as isFalse, isFalseOrUndefined$1 as isFalseOrUndefined, isFinite$1 as isFinite, isFloat$1 as isFloat, isFunction$1 as isFunction, isFunctionOrUndefined$1 as isFunctionOrUndefined, isIncluded$1 as isIncluded, isIndex$1 as isIndex, isInfinity$1 as isInfinity, isInteger$1 as isInteger, isIntegerBetween$1 as isIntegerBetween, isIntegerBetweenExclusive$1 as isIntegerBetweenExclusive, isIntegerEq$1 as isIntegerEq, isIntegerGt$1 as isIntegerGt, isIntegerGte$1 as isIntegerGte, isIntegerLt$1 as isIntegerLt, isIntegerLte$1 as isIntegerLte, isIntegerOrUndefined$1 as isIntegerOrUndefined, isMultipleOf$1 as isMultipleOf, isNaNValue$1 as isNaNValue, isNeg$1 as isNeg, isNegInfinity$1 as isNegInfinity, isNegZero$1 as isNegZero, isNonEmptyArray$1 as isNonEmptyArray, isNonEmptyArrayOrUndefined$1 as isNonEmptyArrayOrUndefined, isNonEmptyString$1 as isNonEmptyString, isNonEmptyStringOrUndefined$1 as isNonEmptyStringOrUndefined, isNonNeg$1 as isNonNeg, isNonNull$1 as isNonNull, isNonPos$1 as isNonPos, isNull$1 as isNull, isNullish$1 as isNullish, isNumber$1 as isNumber, isNumberBetween$1 as isNumberBetween, isNumberBetweenExclusive$1 as isNumberBetweenExclusive, isNumberOrUndefined$1 as isNumberOrUndefined, isNumericString$1 as isNumericString, isObject$1 as isObject, isObjectOrUndefined$1 as isObjectOrUndefined, isOdd$1 as isOdd, isPlainObject$1 as isPlainObject, isPos$1 as isPos, isPosInfinity$1 as isPosInfinity, isPosZero$1 as isPosZero, isPowerOfTwo$1 as isPowerOfTwo, isSafeInteger$1 as isSafeInteger, isStrictEqual$1 as isStrictEqual, isString$1 as isString, isStringOrUndefined$1 as isStringOrUndefined, isTrue$1 as isTrue, isTrueOrUndefined$1 as isTrueOrUndefined, isTypedObject$1 as isTypedObject, isUndefined$1 as isUndefined, isZero$1 as isZero, index$7_require as require, index$7_requireDefined as requireDefined, index$7_requireElement as requireElement, index$7_setErrorClass as setErrorClass };
|
|
116
|
+
export { type index$7_ErrorConstructor as ErrorConstructor, index$7_assert as assert, doesNotThrow$1 as doesNotThrow, doesThrow$1 as doesThrow, index$7_fail as fail, isArray$1 as isArray, isArrayOrUndefined$1 as isArrayOrUndefined, isBigInt$1 as isBigInt, isBoolean$1 as isBoolean, isBooleanOrUndefined$1 as isBooleanOrUndefined, isDeepEqual$1 as isDeepEqual, isDefined$1 as isDefined, isEmptyArray$1 as isEmptyArray, isEmptyArrayOrUndefined$1 as isEmptyArrayOrUndefined, isEmptyObject$1 as isEmptyObject, isEmptyString$1 as isEmptyString, isEmptyStringOrUndefined$1 as isEmptyStringOrUndefined, isEnumValue$1 as isEnumValue, isEnumValueOrUndefined$1 as isEnumValueOrUndefined, isEven$1 as isEven, isFalse$1 as isFalse, isFalseOrUndefined$1 as isFalseOrUndefined, isFinite$1 as isFinite, isFloat$1 as isFloat, isFunction$1 as isFunction, isFunctionOrUndefined$1 as isFunctionOrUndefined, isIncluded$1 as isIncluded, isIndex$1 as isIndex, isInfinity$1 as isInfinity, isInteger$1 as isInteger, isIntegerBetween$1 as isIntegerBetween, isIntegerBetweenExclusive$1 as isIntegerBetweenExclusive, isIntegerEq$1 as isIntegerEq, isIntegerGt$1 as isIntegerGt, isIntegerGte$1 as isIntegerGte, isIntegerLt$1 as isIntegerLt, isIntegerLte$1 as isIntegerLte, isIntegerOrUndefined$1 as isIntegerOrUndefined, isMultipleOf$1 as isMultipleOf, isNaNValue$1 as isNaNValue, isNeg$1 as isNeg, isNegInfinity$1 as isNegInfinity, isNegZero$1 as isNegZero, isNonEmptyArray$1 as isNonEmptyArray, isNonEmptyArrayOrUndefined$1 as isNonEmptyArrayOrUndefined, isNonEmptyString$1 as isNonEmptyString, isNonEmptyStringOrUndefined$1 as isNonEmptyStringOrUndefined, isNonNeg$1 as isNonNeg, isNonNull$1 as isNonNull, isNonPos$1 as isNonPos, isNull$1 as isNull, isNullish$1 as isNullish, isNumber$1 as isNumber, isNumberBetween$1 as isNumberBetween, isNumberBetweenExclusive$1 as isNumberBetweenExclusive, isNumberEq$1 as isNumberEq, isNumberGt$1 as isNumberGt, isNumberGte$1 as isNumberGte, isNumberLt$1 as isNumberLt, isNumberLte$1 as isNumberLte, isNumberOrUndefined$1 as isNumberOrUndefined, isNumericString$1 as isNumericString, isObject$1 as isObject, isObjectOrUndefined$1 as isObjectOrUndefined, isOdd$1 as isOdd, isPlainObject$1 as isPlainObject, isPos$1 as isPos, isPosInfinity$1 as isPosInfinity, isPosZero$1 as isPosZero, isPowerOfTwo$1 as isPowerOfTwo, isSafeInteger$1 as isSafeInteger, isSafeNumber$1 as isSafeNumber, isStrictEqual$1 as isStrictEqual, isString$1 as isString, isStringOrUndefined$1 as isStringOrUndefined, isTrue$1 as isTrue, isTrueOrUndefined$1 as isTrueOrUndefined, isTypedObject$1 as isTypedObject, isUndefined$1 as isUndefined, isZero$1 as isZero, index$7_require as require, index$7_requireDefined as requireDefined, index$7_requireElement as requireElement, index$7_setErrorClass as setErrorClass };
|
|
111
117
|
}
|
|
112
118
|
|
|
113
119
|
/**
|
|
@@ -269,7 +275,15 @@ declare function isEnumValueOrUndefined<E extends EnumObject>(val: unknown, enum
|
|
|
269
275
|
declare function isNumericString(val: unknown): val is string;
|
|
270
276
|
declare function isBigInt(val: unknown): val is BigInt;
|
|
271
277
|
declare function isNumber(val: unknown): val is number;
|
|
278
|
+
declare function isSafeNumber(val: unknown): val is number;
|
|
272
279
|
declare function isNumberOrUndefined(val: unknown): val is number | undefined;
|
|
280
|
+
declare function isNumberEq(val: unknown, ref: unknown): val is number;
|
|
281
|
+
declare function isNumberGt(val: unknown, ref: unknown): val is number;
|
|
282
|
+
declare function isNumberGte(val: unknown, ref: unknown): val is number;
|
|
283
|
+
declare function isNumberLt(val: unknown, ref: unknown): val is number;
|
|
284
|
+
declare function isNumberLte(val: unknown, ref: unknown): val is number;
|
|
285
|
+
declare function isNumberBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
286
|
+
declare function isNumberBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
273
287
|
declare function isFinite(val: unknown): val is number;
|
|
274
288
|
declare function isFloat(val: unknown): val is number;
|
|
275
289
|
declare function isInteger(val: unknown): val is number;
|
|
@@ -282,8 +296,6 @@ declare function isIntegerLt(val: unknown, ref: unknown): val is number;
|
|
|
282
296
|
declare function isIntegerLte(val: unknown, ref: unknown): val is number;
|
|
283
297
|
declare function isIntegerBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
284
298
|
declare function isIntegerBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
285
|
-
declare function isNumberBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
286
|
-
declare function isNumberBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
287
299
|
declare function isNaNValue(val: unknown): val is number;
|
|
288
300
|
declare function isInfinity(val: unknown): val is number;
|
|
289
301
|
declare function isPosInfinity(val: unknown): val is number;
|
|
@@ -358,6 +370,11 @@ declare const index$6_isNullish: typeof isNullish;
|
|
|
358
370
|
declare const index$6_isNumber: typeof isNumber;
|
|
359
371
|
declare const index$6_isNumberBetween: typeof isNumberBetween;
|
|
360
372
|
declare const index$6_isNumberBetweenExclusive: typeof isNumberBetweenExclusive;
|
|
373
|
+
declare const index$6_isNumberEq: typeof isNumberEq;
|
|
374
|
+
declare const index$6_isNumberGt: typeof isNumberGt;
|
|
375
|
+
declare const index$6_isNumberGte: typeof isNumberGte;
|
|
376
|
+
declare const index$6_isNumberLt: typeof isNumberLt;
|
|
377
|
+
declare const index$6_isNumberLte: typeof isNumberLte;
|
|
361
378
|
declare const index$6_isNumberOrUndefined: typeof isNumberOrUndefined;
|
|
362
379
|
declare const index$6_isNumericString: typeof isNumericString;
|
|
363
380
|
declare const index$6_isObject: typeof isObject;
|
|
@@ -369,6 +386,7 @@ declare const index$6_isPosInfinity: typeof isPosInfinity;
|
|
|
369
386
|
declare const index$6_isPosZero: typeof isPosZero;
|
|
370
387
|
declare const index$6_isPowerOfTwo: typeof isPowerOfTwo;
|
|
371
388
|
declare const index$6_isSafeInteger: typeof isSafeInteger;
|
|
389
|
+
declare const index$6_isSafeNumber: typeof isSafeNumber;
|
|
372
390
|
declare const index$6_isStrictEqual: typeof isStrictEqual;
|
|
373
391
|
declare const index$6_isString: typeof isString;
|
|
374
392
|
declare const index$6_isStringOrUndefined: typeof isStringOrUndefined;
|
|
@@ -379,7 +397,7 @@ declare const index$6_isUndefined: typeof isUndefined;
|
|
|
379
397
|
declare const index$6_isZero: typeof isZero;
|
|
380
398
|
declare const index$6_tryOr: typeof tryOr;
|
|
381
399
|
declare namespace index$6 {
|
|
382
|
-
export { type index$6_HasProps as HasProps, index$6_doesNotThrow as doesNotThrow, index$6_doesThrow as doesThrow, index$6_isArray as isArray, index$6_isArrayOrUndefined as isArrayOrUndefined, index$6_isBigInt as isBigInt, index$6_isBoolean as isBoolean, index$6_isBooleanOrUndefined as isBooleanOrUndefined, index$6_isDeepEqual as isDeepEqual, index$6_isDefined as isDefined, index$6_isEmptyArray as isEmptyArray, index$6_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, index$6_isEmptyObject as isEmptyObject, index$6_isEmptyString as isEmptyString, index$6_isEmptyStringOrUndefined as isEmptyStringOrUndefined, index$6_isEnumValue as isEnumValue, index$6_isEnumValueOrUndefined as isEnumValueOrUndefined, index$6_isEven as isEven, index$6_isFalse as isFalse, index$6_isFalseOrUndefined as isFalseOrUndefined, index$6_isFinite as isFinite, index$6_isFloat as isFloat, index$6_isFunction as isFunction, index$6_isFunctionOrUndefined as isFunctionOrUndefined, index$6_isIncluded as isIncluded, index$6_isIndex as isIndex, index$6_isInfinity as isInfinity, index$6_isInteger as isInteger, index$6_isIntegerBetween as isIntegerBetween, index$6_isIntegerBetweenExclusive as isIntegerBetweenExclusive, index$6_isIntegerEq as isIntegerEq, index$6_isIntegerGt as isIntegerGt, index$6_isIntegerGte as isIntegerGte, index$6_isIntegerLt as isIntegerLt, index$6_isIntegerLte as isIntegerLte, index$6_isIntegerOrUndefined as isIntegerOrUndefined, index$6_isMultipleOf as isMultipleOf, index$6_isNaNValue as isNaNValue, index$6_isNeg as isNeg, index$6_isNegInfinity as isNegInfinity, index$6_isNegZero as isNegZero, index$6_isNonEmptyArray as isNonEmptyArray, index$6_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, index$6_isNonEmptyString as isNonEmptyString, index$6_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, index$6_isNonNeg as isNonNeg, index$6_isNonNull as isNonNull, index$6_isNonPos as isNonPos, index$6_isNull as isNull, index$6_isNullish as isNullish, index$6_isNumber as isNumber, index$6_isNumberBetween as isNumberBetween, index$6_isNumberBetweenExclusive as isNumberBetweenExclusive, index$6_isNumberOrUndefined as isNumberOrUndefined, index$6_isNumericString as isNumericString, index$6_isObject as isObject, index$6_isObjectOrUndefined as isObjectOrUndefined, index$6_isOdd as isOdd, index$6_isPlainObject as isPlainObject, index$6_isPos as isPos, index$6_isPosInfinity as isPosInfinity, index$6_isPosZero as isPosZero, index$6_isPowerOfTwo as isPowerOfTwo, index$6_isSafeInteger as isSafeInteger, index$6_isStrictEqual as isStrictEqual, index$6_isString as isString, index$6_isStringOrUndefined as isStringOrUndefined, index$6_isTrue as isTrue, index$6_isTrueOrUndefined as isTrueOrUndefined, index$6_isTypedObject as isTypedObject, index$6_isUndefined as isUndefined, index$6_isZero as isZero, index$6_tryOr as tryOr };
|
|
400
|
+
export { type index$6_HasProps as HasProps, index$6_doesNotThrow as doesNotThrow, index$6_doesThrow as doesThrow, index$6_isArray as isArray, index$6_isArrayOrUndefined as isArrayOrUndefined, index$6_isBigInt as isBigInt, index$6_isBoolean as isBoolean, index$6_isBooleanOrUndefined as isBooleanOrUndefined, index$6_isDeepEqual as isDeepEqual, index$6_isDefined as isDefined, index$6_isEmptyArray as isEmptyArray, index$6_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, index$6_isEmptyObject as isEmptyObject, index$6_isEmptyString as isEmptyString, index$6_isEmptyStringOrUndefined as isEmptyStringOrUndefined, index$6_isEnumValue as isEnumValue, index$6_isEnumValueOrUndefined as isEnumValueOrUndefined, index$6_isEven as isEven, index$6_isFalse as isFalse, index$6_isFalseOrUndefined as isFalseOrUndefined, index$6_isFinite as isFinite, index$6_isFloat as isFloat, index$6_isFunction as isFunction, index$6_isFunctionOrUndefined as isFunctionOrUndefined, index$6_isIncluded as isIncluded, index$6_isIndex as isIndex, index$6_isInfinity as isInfinity, index$6_isInteger as isInteger, index$6_isIntegerBetween as isIntegerBetween, index$6_isIntegerBetweenExclusive as isIntegerBetweenExclusive, index$6_isIntegerEq as isIntegerEq, index$6_isIntegerGt as isIntegerGt, index$6_isIntegerGte as isIntegerGte, index$6_isIntegerLt as isIntegerLt, index$6_isIntegerLte as isIntegerLte, index$6_isIntegerOrUndefined as isIntegerOrUndefined, index$6_isMultipleOf as isMultipleOf, index$6_isNaNValue as isNaNValue, index$6_isNeg as isNeg, index$6_isNegInfinity as isNegInfinity, index$6_isNegZero as isNegZero, index$6_isNonEmptyArray as isNonEmptyArray, index$6_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, index$6_isNonEmptyString as isNonEmptyString, index$6_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, index$6_isNonNeg as isNonNeg, index$6_isNonNull as isNonNull, index$6_isNonPos as isNonPos, index$6_isNull as isNull, index$6_isNullish as isNullish, index$6_isNumber as isNumber, index$6_isNumberBetween as isNumberBetween, index$6_isNumberBetweenExclusive as isNumberBetweenExclusive, index$6_isNumberEq as isNumberEq, index$6_isNumberGt as isNumberGt, index$6_isNumberGte as isNumberGte, index$6_isNumberLt as isNumberLt, index$6_isNumberLte as isNumberLte, index$6_isNumberOrUndefined as isNumberOrUndefined, index$6_isNumericString as isNumericString, index$6_isObject as isObject, index$6_isObjectOrUndefined as isObjectOrUndefined, index$6_isOdd as isOdd, index$6_isPlainObject as isPlainObject, index$6_isPos as isPos, index$6_isPosInfinity as isPosInfinity, index$6_isPosZero as isPosZero, index$6_isPowerOfTwo as isPowerOfTwo, index$6_isSafeInteger as isSafeInteger, index$6_isSafeNumber as isSafeNumber, index$6_isStrictEqual as isStrictEqual, index$6_isString as isString, index$6_isStringOrUndefined as isStringOrUndefined, index$6_isTrue as isTrue, index$6_isTrueOrUndefined as isTrueOrUndefined, index$6_isTypedObject as isTypedObject, index$6_isUndefined as isUndefined, index$6_isZero as isZero, index$6_tryOr as tryOr };
|
|
383
401
|
}
|
|
384
402
|
|
|
385
403
|
declare function toArray<T>(a: T | T[]): T[];
|
|
@@ -591,6 +609,48 @@ declare function charCount(str: string, ch: string): number;
|
|
|
591
609
|
*/
|
|
592
610
|
declare function makeSentenceFromPascal(PascalString: string): string;
|
|
593
611
|
declare function stringify(value: any, maxDepth?: number, seen?: WeakSet<WeakKey>): string;
|
|
612
|
+
/**
|
|
613
|
+
* Splits a string into words by capital letters (A–Z).
|
|
614
|
+
*
|
|
615
|
+
* Example:
|
|
616
|
+
* ```ts
|
|
617
|
+
* splitByCaps("HelloWorld"); // ["Hello", "World"]
|
|
618
|
+
* splitByCaps("XMLHttpRequest"); // ["XML", "Http", "Request"]
|
|
619
|
+
* ```
|
|
620
|
+
*
|
|
621
|
+
* @param str - The input string to split.
|
|
622
|
+
* @returns An array of string segments split at capital letters.
|
|
623
|
+
*/
|
|
624
|
+
declare function splitByCaps(str: string): string[];
|
|
625
|
+
/**
|
|
626
|
+
* Splits a string by any of the given substrings.
|
|
627
|
+
* Each splitter is treated literally (special regex characters are escaped).
|
|
628
|
+
*
|
|
629
|
+
* Example:
|
|
630
|
+
* ```ts
|
|
631
|
+
* splitByStrings("one--two__three", "--", "__");
|
|
632
|
+
* // ["one", "two", "three"]
|
|
633
|
+
* ```
|
|
634
|
+
*
|
|
635
|
+
* @param str - The input string to split.
|
|
636
|
+
* @param splitters - One or more substrings to split by.
|
|
637
|
+
* @returns An array of string segments split at any of the given substrings.
|
|
638
|
+
*/
|
|
639
|
+
declare function splitByStrings(str: string, ...splitters: string[]): string[];
|
|
640
|
+
/**
|
|
641
|
+
* Splits a string by any of the given characters.
|
|
642
|
+
*
|
|
643
|
+
* Example:
|
|
644
|
+
* ```ts
|
|
645
|
+
* splitByChars("a,b;c", ",;");
|
|
646
|
+
* // ["a", "b", "c"]
|
|
647
|
+
* ```
|
|
648
|
+
*
|
|
649
|
+
* @param str - The input string to split.
|
|
650
|
+
* @param splitters - A string containing one or more characters to split by.
|
|
651
|
+
* @returns An array of string segments split at any of the given characters.
|
|
652
|
+
*/
|
|
653
|
+
declare function splitByChars(str: string, splitters: string): string[];
|
|
594
654
|
|
|
595
655
|
declare const index$1_charCount: typeof charCount;
|
|
596
656
|
declare const index$1_chunkString: typeof chunkString;
|
|
@@ -600,10 +660,13 @@ declare const index$1_makeSentenceFromPascal: typeof makeSentenceFromPascal;
|
|
|
600
660
|
declare const index$1_removeAt: typeof removeAt;
|
|
601
661
|
declare const index$1_repeatString: typeof repeatString;
|
|
602
662
|
declare const index$1_replaceAt: typeof replaceAt;
|
|
663
|
+
declare const index$1_splitByCaps: typeof splitByCaps;
|
|
664
|
+
declare const index$1_splitByChars: typeof splitByChars;
|
|
665
|
+
declare const index$1_splitByStrings: typeof splitByStrings;
|
|
603
666
|
declare const index$1_stringify: typeof stringify;
|
|
604
667
|
declare const index$1_toCharArray: typeof toCharArray;
|
|
605
668
|
declare namespace index$1 {
|
|
606
|
-
export { index$1_charCount as charCount, index$1_chunkString as chunkString, index$1_insertAt as insertAt, index$1_isString as isString, index$1_makeSentenceFromPascal as makeSentenceFromPascal, index$1_removeAt as removeAt, index$1_repeatString as repeatString, index$1_replaceAt as replaceAt, index$1_stringify as stringify, index$1_toCharArray as toCharArray };
|
|
669
|
+
export { index$1_charCount as charCount, index$1_chunkString as chunkString, index$1_insertAt as insertAt, index$1_isString as isString, index$1_makeSentenceFromPascal as makeSentenceFromPascal, index$1_removeAt as removeAt, index$1_repeatString as repeatString, index$1_replaceAt as replaceAt, index$1_splitByCaps as splitByCaps, index$1_splitByChars as splitByChars, index$1_splitByStrings as splitByStrings, index$1_stringify as stringify, index$1_toCharArray as toCharArray };
|
|
607
670
|
}
|
|
608
671
|
|
|
609
672
|
declare namespace index {
|
package/dist/index.d.ts
CHANGED
|
@@ -63,7 +63,15 @@ declare function isEnumValueOrUndefined$1<E extends EnumObject>(val: unknown, en
|
|
|
63
63
|
declare function isNumericString$1(val: unknown, msg?: string): string;
|
|
64
64
|
declare function isBigInt$1(val: unknown, msg?: string): BigInt;
|
|
65
65
|
declare function isNumber$1(val: unknown, msg?: string): number;
|
|
66
|
+
declare function isSafeNumber$1(val: unknown, msg?: string): number;
|
|
66
67
|
declare function isNumberOrUndefined$1(val: unknown, msg?: string): number | undefined;
|
|
68
|
+
declare function isNumberEq$1(val: unknown, ref: unknown, msg?: string): number;
|
|
69
|
+
declare function isNumberGt$1(val: unknown, ref: unknown, msg?: string): number;
|
|
70
|
+
declare function isNumberGte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
71
|
+
declare function isNumberLt$1(val: unknown, ref: unknown, msg?: string): number;
|
|
72
|
+
declare function isNumberLte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
73
|
+
declare function isNumberBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
74
|
+
declare function isNumberBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
67
75
|
declare function isFinite$1(val: unknown, msg?: string): number;
|
|
68
76
|
declare function isFloat$1(val: unknown, msg?: string): number;
|
|
69
77
|
declare function isInteger$1(val: unknown, msg?: string): number;
|
|
@@ -76,8 +84,6 @@ declare function isIntegerLt$1(val: unknown, ref: unknown, msg?: string): number
|
|
|
76
84
|
declare function isIntegerLte$1(val: unknown, ref: unknown, msg?: string): number;
|
|
77
85
|
declare function isIntegerBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
78
86
|
declare function isIntegerBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
79
|
-
declare function isNumberBetween$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
80
|
-
declare function isNumberBetweenExclusive$1(val: unknown, min: unknown, max: unknown, msg?: string): number;
|
|
81
87
|
declare function isNaNValue$1(val: unknown, msg?: string): number;
|
|
82
88
|
declare function isInfinity$1(val: unknown, msg?: string): number;
|
|
83
89
|
declare function isPosInfinity$1(val: unknown, msg?: string): number;
|
|
@@ -107,7 +113,7 @@ declare const index$7_requireDefined: typeof requireDefined;
|
|
|
107
113
|
declare const index$7_requireElement: typeof requireElement;
|
|
108
114
|
declare const index$7_setErrorClass: typeof setErrorClass;
|
|
109
115
|
declare namespace index$7 {
|
|
110
|
-
export { type index$7_ErrorConstructor as ErrorConstructor, index$7_assert as assert, doesNotThrow$1 as doesNotThrow, doesThrow$1 as doesThrow, index$7_fail as fail, isArray$1 as isArray, isArrayOrUndefined$1 as isArrayOrUndefined, isBigInt$1 as isBigInt, isBoolean$1 as isBoolean, isBooleanOrUndefined$1 as isBooleanOrUndefined, isDeepEqual$1 as isDeepEqual, isDefined$1 as isDefined, isEmptyArray$1 as isEmptyArray, isEmptyArrayOrUndefined$1 as isEmptyArrayOrUndefined, isEmptyObject$1 as isEmptyObject, isEmptyString$1 as isEmptyString, isEmptyStringOrUndefined$1 as isEmptyStringOrUndefined, isEnumValue$1 as isEnumValue, isEnumValueOrUndefined$1 as isEnumValueOrUndefined, isEven$1 as isEven, isFalse$1 as isFalse, isFalseOrUndefined$1 as isFalseOrUndefined, isFinite$1 as isFinite, isFloat$1 as isFloat, isFunction$1 as isFunction, isFunctionOrUndefined$1 as isFunctionOrUndefined, isIncluded$1 as isIncluded, isIndex$1 as isIndex, isInfinity$1 as isInfinity, isInteger$1 as isInteger, isIntegerBetween$1 as isIntegerBetween, isIntegerBetweenExclusive$1 as isIntegerBetweenExclusive, isIntegerEq$1 as isIntegerEq, isIntegerGt$1 as isIntegerGt, isIntegerGte$1 as isIntegerGte, isIntegerLt$1 as isIntegerLt, isIntegerLte$1 as isIntegerLte, isIntegerOrUndefined$1 as isIntegerOrUndefined, isMultipleOf$1 as isMultipleOf, isNaNValue$1 as isNaNValue, isNeg$1 as isNeg, isNegInfinity$1 as isNegInfinity, isNegZero$1 as isNegZero, isNonEmptyArray$1 as isNonEmptyArray, isNonEmptyArrayOrUndefined$1 as isNonEmptyArrayOrUndefined, isNonEmptyString$1 as isNonEmptyString, isNonEmptyStringOrUndefined$1 as isNonEmptyStringOrUndefined, isNonNeg$1 as isNonNeg, isNonNull$1 as isNonNull, isNonPos$1 as isNonPos, isNull$1 as isNull, isNullish$1 as isNullish, isNumber$1 as isNumber, isNumberBetween$1 as isNumberBetween, isNumberBetweenExclusive$1 as isNumberBetweenExclusive, isNumberOrUndefined$1 as isNumberOrUndefined, isNumericString$1 as isNumericString, isObject$1 as isObject, isObjectOrUndefined$1 as isObjectOrUndefined, isOdd$1 as isOdd, isPlainObject$1 as isPlainObject, isPos$1 as isPos, isPosInfinity$1 as isPosInfinity, isPosZero$1 as isPosZero, isPowerOfTwo$1 as isPowerOfTwo, isSafeInteger$1 as isSafeInteger, isStrictEqual$1 as isStrictEqual, isString$1 as isString, isStringOrUndefined$1 as isStringOrUndefined, isTrue$1 as isTrue, isTrueOrUndefined$1 as isTrueOrUndefined, isTypedObject$1 as isTypedObject, isUndefined$1 as isUndefined, isZero$1 as isZero, index$7_require as require, index$7_requireDefined as requireDefined, index$7_requireElement as requireElement, index$7_setErrorClass as setErrorClass };
|
|
116
|
+
export { type index$7_ErrorConstructor as ErrorConstructor, index$7_assert as assert, doesNotThrow$1 as doesNotThrow, doesThrow$1 as doesThrow, index$7_fail as fail, isArray$1 as isArray, isArrayOrUndefined$1 as isArrayOrUndefined, isBigInt$1 as isBigInt, isBoolean$1 as isBoolean, isBooleanOrUndefined$1 as isBooleanOrUndefined, isDeepEqual$1 as isDeepEqual, isDefined$1 as isDefined, isEmptyArray$1 as isEmptyArray, isEmptyArrayOrUndefined$1 as isEmptyArrayOrUndefined, isEmptyObject$1 as isEmptyObject, isEmptyString$1 as isEmptyString, isEmptyStringOrUndefined$1 as isEmptyStringOrUndefined, isEnumValue$1 as isEnumValue, isEnumValueOrUndefined$1 as isEnumValueOrUndefined, isEven$1 as isEven, isFalse$1 as isFalse, isFalseOrUndefined$1 as isFalseOrUndefined, isFinite$1 as isFinite, isFloat$1 as isFloat, isFunction$1 as isFunction, isFunctionOrUndefined$1 as isFunctionOrUndefined, isIncluded$1 as isIncluded, isIndex$1 as isIndex, isInfinity$1 as isInfinity, isInteger$1 as isInteger, isIntegerBetween$1 as isIntegerBetween, isIntegerBetweenExclusive$1 as isIntegerBetweenExclusive, isIntegerEq$1 as isIntegerEq, isIntegerGt$1 as isIntegerGt, isIntegerGte$1 as isIntegerGte, isIntegerLt$1 as isIntegerLt, isIntegerLte$1 as isIntegerLte, isIntegerOrUndefined$1 as isIntegerOrUndefined, isMultipleOf$1 as isMultipleOf, isNaNValue$1 as isNaNValue, isNeg$1 as isNeg, isNegInfinity$1 as isNegInfinity, isNegZero$1 as isNegZero, isNonEmptyArray$1 as isNonEmptyArray, isNonEmptyArrayOrUndefined$1 as isNonEmptyArrayOrUndefined, isNonEmptyString$1 as isNonEmptyString, isNonEmptyStringOrUndefined$1 as isNonEmptyStringOrUndefined, isNonNeg$1 as isNonNeg, isNonNull$1 as isNonNull, isNonPos$1 as isNonPos, isNull$1 as isNull, isNullish$1 as isNullish, isNumber$1 as isNumber, isNumberBetween$1 as isNumberBetween, isNumberBetweenExclusive$1 as isNumberBetweenExclusive, isNumberEq$1 as isNumberEq, isNumberGt$1 as isNumberGt, isNumberGte$1 as isNumberGte, isNumberLt$1 as isNumberLt, isNumberLte$1 as isNumberLte, isNumberOrUndefined$1 as isNumberOrUndefined, isNumericString$1 as isNumericString, isObject$1 as isObject, isObjectOrUndefined$1 as isObjectOrUndefined, isOdd$1 as isOdd, isPlainObject$1 as isPlainObject, isPos$1 as isPos, isPosInfinity$1 as isPosInfinity, isPosZero$1 as isPosZero, isPowerOfTwo$1 as isPowerOfTwo, isSafeInteger$1 as isSafeInteger, isSafeNumber$1 as isSafeNumber, isStrictEqual$1 as isStrictEqual, isString$1 as isString, isStringOrUndefined$1 as isStringOrUndefined, isTrue$1 as isTrue, isTrueOrUndefined$1 as isTrueOrUndefined, isTypedObject$1 as isTypedObject, isUndefined$1 as isUndefined, isZero$1 as isZero, index$7_require as require, index$7_requireDefined as requireDefined, index$7_requireElement as requireElement, index$7_setErrorClass as setErrorClass };
|
|
111
117
|
}
|
|
112
118
|
|
|
113
119
|
/**
|
|
@@ -269,7 +275,15 @@ declare function isEnumValueOrUndefined<E extends EnumObject>(val: unknown, enum
|
|
|
269
275
|
declare function isNumericString(val: unknown): val is string;
|
|
270
276
|
declare function isBigInt(val: unknown): val is BigInt;
|
|
271
277
|
declare function isNumber(val: unknown): val is number;
|
|
278
|
+
declare function isSafeNumber(val: unknown): val is number;
|
|
272
279
|
declare function isNumberOrUndefined(val: unknown): val is number | undefined;
|
|
280
|
+
declare function isNumberEq(val: unknown, ref: unknown): val is number;
|
|
281
|
+
declare function isNumberGt(val: unknown, ref: unknown): val is number;
|
|
282
|
+
declare function isNumberGte(val: unknown, ref: unknown): val is number;
|
|
283
|
+
declare function isNumberLt(val: unknown, ref: unknown): val is number;
|
|
284
|
+
declare function isNumberLte(val: unknown, ref: unknown): val is number;
|
|
285
|
+
declare function isNumberBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
286
|
+
declare function isNumberBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
273
287
|
declare function isFinite(val: unknown): val is number;
|
|
274
288
|
declare function isFloat(val: unknown): val is number;
|
|
275
289
|
declare function isInteger(val: unknown): val is number;
|
|
@@ -282,8 +296,6 @@ declare function isIntegerLt(val: unknown, ref: unknown): val is number;
|
|
|
282
296
|
declare function isIntegerLte(val: unknown, ref: unknown): val is number;
|
|
283
297
|
declare function isIntegerBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
284
298
|
declare function isIntegerBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
285
|
-
declare function isNumberBetween(val: unknown, min: unknown, max: unknown): val is number;
|
|
286
|
-
declare function isNumberBetweenExclusive(val: unknown, min: unknown, max: unknown): val is number;
|
|
287
299
|
declare function isNaNValue(val: unknown): val is number;
|
|
288
300
|
declare function isInfinity(val: unknown): val is number;
|
|
289
301
|
declare function isPosInfinity(val: unknown): val is number;
|
|
@@ -358,6 +370,11 @@ declare const index$6_isNullish: typeof isNullish;
|
|
|
358
370
|
declare const index$6_isNumber: typeof isNumber;
|
|
359
371
|
declare const index$6_isNumberBetween: typeof isNumberBetween;
|
|
360
372
|
declare const index$6_isNumberBetweenExclusive: typeof isNumberBetweenExclusive;
|
|
373
|
+
declare const index$6_isNumberEq: typeof isNumberEq;
|
|
374
|
+
declare const index$6_isNumberGt: typeof isNumberGt;
|
|
375
|
+
declare const index$6_isNumberGte: typeof isNumberGte;
|
|
376
|
+
declare const index$6_isNumberLt: typeof isNumberLt;
|
|
377
|
+
declare const index$6_isNumberLte: typeof isNumberLte;
|
|
361
378
|
declare const index$6_isNumberOrUndefined: typeof isNumberOrUndefined;
|
|
362
379
|
declare const index$6_isNumericString: typeof isNumericString;
|
|
363
380
|
declare const index$6_isObject: typeof isObject;
|
|
@@ -369,6 +386,7 @@ declare const index$6_isPosInfinity: typeof isPosInfinity;
|
|
|
369
386
|
declare const index$6_isPosZero: typeof isPosZero;
|
|
370
387
|
declare const index$6_isPowerOfTwo: typeof isPowerOfTwo;
|
|
371
388
|
declare const index$6_isSafeInteger: typeof isSafeInteger;
|
|
389
|
+
declare const index$6_isSafeNumber: typeof isSafeNumber;
|
|
372
390
|
declare const index$6_isStrictEqual: typeof isStrictEqual;
|
|
373
391
|
declare const index$6_isString: typeof isString;
|
|
374
392
|
declare const index$6_isStringOrUndefined: typeof isStringOrUndefined;
|
|
@@ -379,7 +397,7 @@ declare const index$6_isUndefined: typeof isUndefined;
|
|
|
379
397
|
declare const index$6_isZero: typeof isZero;
|
|
380
398
|
declare const index$6_tryOr: typeof tryOr;
|
|
381
399
|
declare namespace index$6 {
|
|
382
|
-
export { type index$6_HasProps as HasProps, index$6_doesNotThrow as doesNotThrow, index$6_doesThrow as doesThrow, index$6_isArray as isArray, index$6_isArrayOrUndefined as isArrayOrUndefined, index$6_isBigInt as isBigInt, index$6_isBoolean as isBoolean, index$6_isBooleanOrUndefined as isBooleanOrUndefined, index$6_isDeepEqual as isDeepEqual, index$6_isDefined as isDefined, index$6_isEmptyArray as isEmptyArray, index$6_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, index$6_isEmptyObject as isEmptyObject, index$6_isEmptyString as isEmptyString, index$6_isEmptyStringOrUndefined as isEmptyStringOrUndefined, index$6_isEnumValue as isEnumValue, index$6_isEnumValueOrUndefined as isEnumValueOrUndefined, index$6_isEven as isEven, index$6_isFalse as isFalse, index$6_isFalseOrUndefined as isFalseOrUndefined, index$6_isFinite as isFinite, index$6_isFloat as isFloat, index$6_isFunction as isFunction, index$6_isFunctionOrUndefined as isFunctionOrUndefined, index$6_isIncluded as isIncluded, index$6_isIndex as isIndex, index$6_isInfinity as isInfinity, index$6_isInteger as isInteger, index$6_isIntegerBetween as isIntegerBetween, index$6_isIntegerBetweenExclusive as isIntegerBetweenExclusive, index$6_isIntegerEq as isIntegerEq, index$6_isIntegerGt as isIntegerGt, index$6_isIntegerGte as isIntegerGte, index$6_isIntegerLt as isIntegerLt, index$6_isIntegerLte as isIntegerLte, index$6_isIntegerOrUndefined as isIntegerOrUndefined, index$6_isMultipleOf as isMultipleOf, index$6_isNaNValue as isNaNValue, index$6_isNeg as isNeg, index$6_isNegInfinity as isNegInfinity, index$6_isNegZero as isNegZero, index$6_isNonEmptyArray as isNonEmptyArray, index$6_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, index$6_isNonEmptyString as isNonEmptyString, index$6_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, index$6_isNonNeg as isNonNeg, index$6_isNonNull as isNonNull, index$6_isNonPos as isNonPos, index$6_isNull as isNull, index$6_isNullish as isNullish, index$6_isNumber as isNumber, index$6_isNumberBetween as isNumberBetween, index$6_isNumberBetweenExclusive as isNumberBetweenExclusive, index$6_isNumberOrUndefined as isNumberOrUndefined, index$6_isNumericString as isNumericString, index$6_isObject as isObject, index$6_isObjectOrUndefined as isObjectOrUndefined, index$6_isOdd as isOdd, index$6_isPlainObject as isPlainObject, index$6_isPos as isPos, index$6_isPosInfinity as isPosInfinity, index$6_isPosZero as isPosZero, index$6_isPowerOfTwo as isPowerOfTwo, index$6_isSafeInteger as isSafeInteger, index$6_isStrictEqual as isStrictEqual, index$6_isString as isString, index$6_isStringOrUndefined as isStringOrUndefined, index$6_isTrue as isTrue, index$6_isTrueOrUndefined as isTrueOrUndefined, index$6_isTypedObject as isTypedObject, index$6_isUndefined as isUndefined, index$6_isZero as isZero, index$6_tryOr as tryOr };
|
|
400
|
+
export { type index$6_HasProps as HasProps, index$6_doesNotThrow as doesNotThrow, index$6_doesThrow as doesThrow, index$6_isArray as isArray, index$6_isArrayOrUndefined as isArrayOrUndefined, index$6_isBigInt as isBigInt, index$6_isBoolean as isBoolean, index$6_isBooleanOrUndefined as isBooleanOrUndefined, index$6_isDeepEqual as isDeepEqual, index$6_isDefined as isDefined, index$6_isEmptyArray as isEmptyArray, index$6_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, index$6_isEmptyObject as isEmptyObject, index$6_isEmptyString as isEmptyString, index$6_isEmptyStringOrUndefined as isEmptyStringOrUndefined, index$6_isEnumValue as isEnumValue, index$6_isEnumValueOrUndefined as isEnumValueOrUndefined, index$6_isEven as isEven, index$6_isFalse as isFalse, index$6_isFalseOrUndefined as isFalseOrUndefined, index$6_isFinite as isFinite, index$6_isFloat as isFloat, index$6_isFunction as isFunction, index$6_isFunctionOrUndefined as isFunctionOrUndefined, index$6_isIncluded as isIncluded, index$6_isIndex as isIndex, index$6_isInfinity as isInfinity, index$6_isInteger as isInteger, index$6_isIntegerBetween as isIntegerBetween, index$6_isIntegerBetweenExclusive as isIntegerBetweenExclusive, index$6_isIntegerEq as isIntegerEq, index$6_isIntegerGt as isIntegerGt, index$6_isIntegerGte as isIntegerGte, index$6_isIntegerLt as isIntegerLt, index$6_isIntegerLte as isIntegerLte, index$6_isIntegerOrUndefined as isIntegerOrUndefined, index$6_isMultipleOf as isMultipleOf, index$6_isNaNValue as isNaNValue, index$6_isNeg as isNeg, index$6_isNegInfinity as isNegInfinity, index$6_isNegZero as isNegZero, index$6_isNonEmptyArray as isNonEmptyArray, index$6_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, index$6_isNonEmptyString as isNonEmptyString, index$6_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, index$6_isNonNeg as isNonNeg, index$6_isNonNull as isNonNull, index$6_isNonPos as isNonPos, index$6_isNull as isNull, index$6_isNullish as isNullish, index$6_isNumber as isNumber, index$6_isNumberBetween as isNumberBetween, index$6_isNumberBetweenExclusive as isNumberBetweenExclusive, index$6_isNumberEq as isNumberEq, index$6_isNumberGt as isNumberGt, index$6_isNumberGte as isNumberGte, index$6_isNumberLt as isNumberLt, index$6_isNumberLte as isNumberLte, index$6_isNumberOrUndefined as isNumberOrUndefined, index$6_isNumericString as isNumericString, index$6_isObject as isObject, index$6_isObjectOrUndefined as isObjectOrUndefined, index$6_isOdd as isOdd, index$6_isPlainObject as isPlainObject, index$6_isPos as isPos, index$6_isPosInfinity as isPosInfinity, index$6_isPosZero as isPosZero, index$6_isPowerOfTwo as isPowerOfTwo, index$6_isSafeInteger as isSafeInteger, index$6_isSafeNumber as isSafeNumber, index$6_isStrictEqual as isStrictEqual, index$6_isString as isString, index$6_isStringOrUndefined as isStringOrUndefined, index$6_isTrue as isTrue, index$6_isTrueOrUndefined as isTrueOrUndefined, index$6_isTypedObject as isTypedObject, index$6_isUndefined as isUndefined, index$6_isZero as isZero, index$6_tryOr as tryOr };
|
|
383
401
|
}
|
|
384
402
|
|
|
385
403
|
declare function toArray<T>(a: T | T[]): T[];
|
|
@@ -591,6 +609,48 @@ declare function charCount(str: string, ch: string): number;
|
|
|
591
609
|
*/
|
|
592
610
|
declare function makeSentenceFromPascal(PascalString: string): string;
|
|
593
611
|
declare function stringify(value: any, maxDepth?: number, seen?: WeakSet<WeakKey>): string;
|
|
612
|
+
/**
|
|
613
|
+
* Splits a string into words by capital letters (A–Z).
|
|
614
|
+
*
|
|
615
|
+
* Example:
|
|
616
|
+
* ```ts
|
|
617
|
+
* splitByCaps("HelloWorld"); // ["Hello", "World"]
|
|
618
|
+
* splitByCaps("XMLHttpRequest"); // ["XML", "Http", "Request"]
|
|
619
|
+
* ```
|
|
620
|
+
*
|
|
621
|
+
* @param str - The input string to split.
|
|
622
|
+
* @returns An array of string segments split at capital letters.
|
|
623
|
+
*/
|
|
624
|
+
declare function splitByCaps(str: string): string[];
|
|
625
|
+
/**
|
|
626
|
+
* Splits a string by any of the given substrings.
|
|
627
|
+
* Each splitter is treated literally (special regex characters are escaped).
|
|
628
|
+
*
|
|
629
|
+
* Example:
|
|
630
|
+
* ```ts
|
|
631
|
+
* splitByStrings("one--two__three", "--", "__");
|
|
632
|
+
* // ["one", "two", "three"]
|
|
633
|
+
* ```
|
|
634
|
+
*
|
|
635
|
+
* @param str - The input string to split.
|
|
636
|
+
* @param splitters - One or more substrings to split by.
|
|
637
|
+
* @returns An array of string segments split at any of the given substrings.
|
|
638
|
+
*/
|
|
639
|
+
declare function splitByStrings(str: string, ...splitters: string[]): string[];
|
|
640
|
+
/**
|
|
641
|
+
* Splits a string by any of the given characters.
|
|
642
|
+
*
|
|
643
|
+
* Example:
|
|
644
|
+
* ```ts
|
|
645
|
+
* splitByChars("a,b;c", ",;");
|
|
646
|
+
* // ["a", "b", "c"]
|
|
647
|
+
* ```
|
|
648
|
+
*
|
|
649
|
+
* @param str - The input string to split.
|
|
650
|
+
* @param splitters - A string containing one or more characters to split by.
|
|
651
|
+
* @returns An array of string segments split at any of the given characters.
|
|
652
|
+
*/
|
|
653
|
+
declare function splitByChars(str: string, splitters: string): string[];
|
|
594
654
|
|
|
595
655
|
declare const index$1_charCount: typeof charCount;
|
|
596
656
|
declare const index$1_chunkString: typeof chunkString;
|
|
@@ -600,10 +660,13 @@ declare const index$1_makeSentenceFromPascal: typeof makeSentenceFromPascal;
|
|
|
600
660
|
declare const index$1_removeAt: typeof removeAt;
|
|
601
661
|
declare const index$1_repeatString: typeof repeatString;
|
|
602
662
|
declare const index$1_replaceAt: typeof replaceAt;
|
|
663
|
+
declare const index$1_splitByCaps: typeof splitByCaps;
|
|
664
|
+
declare const index$1_splitByChars: typeof splitByChars;
|
|
665
|
+
declare const index$1_splitByStrings: typeof splitByStrings;
|
|
603
666
|
declare const index$1_stringify: typeof stringify;
|
|
604
667
|
declare const index$1_toCharArray: typeof toCharArray;
|
|
605
668
|
declare namespace index$1 {
|
|
606
|
-
export { index$1_charCount as charCount, index$1_chunkString as chunkString, index$1_insertAt as insertAt, index$1_isString as isString, index$1_makeSentenceFromPascal as makeSentenceFromPascal, index$1_removeAt as removeAt, index$1_repeatString as repeatString, index$1_replaceAt as replaceAt, index$1_stringify as stringify, index$1_toCharArray as toCharArray };
|
|
669
|
+
export { index$1_charCount as charCount, index$1_chunkString as chunkString, index$1_insertAt as insertAt, index$1_isString as isString, index$1_makeSentenceFromPascal as makeSentenceFromPascal, index$1_removeAt as removeAt, index$1_repeatString as repeatString, index$1_replaceAt as replaceAt, index$1_splitByCaps as splitByCaps, index$1_splitByChars as splitByChars, index$1_splitByStrings as splitByStrings, index$1_stringify as stringify, index$1_toCharArray as toCharArray };
|
|
607
670
|
}
|
|
608
671
|
|
|
609
672
|
declare namespace index {
|