Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yookue/ts-lang-utils

Package Overview
Dependencies
Maintainers
0
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yookue/ts-lang-utils - npm Package Compare versions

Comparing version 0.1.56 to 0.1.57

44

dist/cjs/util/ArrayUtils.js

@@ -37,5 +37,7 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* ArrayUtils.add(undefined, 'bar'); // ['bar']
* ArrayUtils.add(['foo', 'bar'], undefined); // ['foo', 'bar']
* ArrayUtils.add(['foo', 'bar'], 'world'); // ['foo', 'bar', 'world']
* ```
*/

@@ -62,5 +64,7 @@ static add(array, element) {

* @example
* ```ts
* ArrayUtils.addAll(undefined, ['bar']); // ['bar']
* ArrayUtils.addAll(['foo', 'bar'], undefined); // ['foo', 'bar']
* ArrayUtils.addAll(['foo', 'bar'], ['world']); // ['foo', 'bar', 'world']
* ```
*/

@@ -85,3 +89,5 @@ static addAll(array, elements) {

* @example
* ```ts
* ArrayUtils.count(['foo', 'bar', 'foobar'], value => value.includes('foo')); // 2
* ```
*/

@@ -105,3 +111,5 @@ static count(array, predicate) {

* @example
* ```ts
* ArrayUtils.firstNotNil([null, undefined, 'foo', 'bar', {}]); // 'foo'
* ```
*/

@@ -119,3 +127,5 @@ static firstNotNil(array) {

* @example
* ```ts
* ArrayUtils.firstNotEmpty([null, undefined, {}, 'foo', 'bar']); // 'foo'
* ```
*/

@@ -133,3 +143,5 @@ static firstNotEmpty(array) {

* @example
* ```ts
* ArrayUtils.getFirst(['foo', 'bar']); // 'foo'
* ```
*/

@@ -147,3 +159,5 @@ static getFirst(array) {

* @example
* ```ts
* ArrayUtils.getLast(['foo', 'bar']); // 'bar'
* ```
*/

@@ -161,4 +175,6 @@ static getLast(array) {

* @example
* ```ts
* ArrayUtils.getLength([]); // 0
* ArrayUtils.getLength(['foo', 'bar']); // 2
* ```
*/

@@ -176,3 +192,5 @@ static getLength(array) {

* @example
* ```ts
* ArrayUtils.getTypeof(['foo', 'bar']); // ['string', 'string']
* ```
*/

@@ -201,3 +219,5 @@ static getTypeof(array) {

* @example
* ```ts
* ArrayUtils.isEmpty([]); // true
* ```
*/

@@ -215,3 +235,5 @@ static isEmpty(array) {

* @example
* ```ts
* ArrayUtils.isNotEmpty(['foo', 'bar']); // true
* ```
*/

@@ -231,4 +253,6 @@ static isNotEmpty(array) {

* @example
* ```ts
* ArrayUtils.isTypeof(['foo', 'bar'], 'string'); // true
* ArrayUtils.isTypeof(['foo', 'bar', null], 'string', true); // true
* ```
*/

@@ -252,3 +276,5 @@ static isTypeof(array, type, relaxed = false) {

* @example
* ```ts
* ArrayUtils.includes(['foo', 'bar'], 'foo'); // true
* ```
*/

@@ -267,4 +293,6 @@ static includes(array, element) {

* @example
* ```ts
* ArrayUtils.includesAll(['foo', 'bar'], ['foo', 'bar']); // true
* ArrayUtils.includesAll(['foo', 'bar'], ['foo', 'world']); // false
* ```
*/

@@ -283,4 +311,6 @@ static includesAll(array, elements) {

* @example
* ```ts
* ArrayUtils.includesAny(['foo', 'bar'], ['foo', 'bar']); // true
* ArrayUtils.includesAny(['foo', 'bar'], ['foo', 'world']); // true
* ```
*/

@@ -300,2 +330,3 @@ static includesAny(array, elements) {

* @example
* ```ts
* ArrayUtils.insert(['foo', 'bar'], -1, ['hello', 'world']); // ['foo', 'bar', 'hello', 'world']

@@ -305,2 +336,3 @@ * ArrayUtils.insert(['foo', 'bar'], 0, ['hello', 'world']); // ['hello', 'world', 'foo', 'bar']

* ArrayUtils.insert(['foo', 'bar'], 9, ['hello', 'world']); // ['foo', 'bar', 'hello', 'world']
* ```
*/

@@ -330,3 +362,5 @@ static insert(array, index, elements) {

* @example
* ```ts
* ArrayUtils.maxLength(['foo', 'bar'], [1, 2, 3]); // 3
* ```
*/

@@ -351,3 +385,5 @@ static maxLength(...arrays) {

* @example
* ```ts
* ArrayUtils.minLength(['foo', 'bar'], [1, 2, 3], []); // 0
* ```
*/

@@ -387,5 +423,7 @@ static minLength(...arrays) {

* @example
* ```ts
* ArrayUtils.remove(undefined, 'bar'); // undefined
* ArrayUtils.remove(['foo', 'bar'], undefined); // ['foo', 'bar']
* ArrayUtils.remove(['foo', 'bar'], 'bar'); // ['foo']
* ```
*/

@@ -404,5 +442,7 @@ static remove(array, element) {

* @example
* ```ts
* ArrayUtils.removeAll(undefined, ['bar']); // undefined
* ArrayUtils.removeAll(['foo', 'bar'], undefined); // ['foo', 'bar']
* ArrayUtils.removeAll(['foo', 'bar'], ['bar']); // ['foo']
* ```
*/

@@ -420,5 +460,7 @@ static removeAll(array, elements) {

* @example
* ```ts
* ArrayUtils.reverse(undefined); // undefined
* ArrayUtils.reverse(['foo', 'bar']); // ['bar', 'foo']
* ArrayUtils.reverse(['foo', 'bar'], 0, 1); // ['foo']
* ```
*/

@@ -441,3 +483,5 @@ static reverse(array, startInclusive, endExclusive) {

* @example
* ```ts
* ArrayUtils.singleton('foobar'); // ['foobar']
* ```
*/

@@ -444,0 +488,0 @@ static singleton(element) {

@@ -36,5 +36,7 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* BooleanUtils.allTrue([null, undefined]); // false
* BooleanUtils.allTrue([null, true]); // false
* BooleanUtils.allTrue([true, true]); // true
* ```
*/

@@ -52,5 +54,7 @@ static allTrue(values) {

* @example
* ```ts
* BooleanUtils.allNotTrue([null, undefined]); // true
* BooleanUtils.allNotTrue([null, true]); // false
* BooleanUtils.allNotTrue([null, false]); // true
* ```
*/

@@ -68,5 +72,7 @@ static allNotTrue(values) {

* @example
* ```ts
* BooleanUtils.allFalse([null, undefined]); // false
* BooleanUtils.allFalse([null, false]); // false
* BooleanUtils.allFalse([false, false]); // true
* ```
*/

@@ -84,5 +90,7 @@ static allFalse(values) {

* @example
* ```ts
* BooleanUtils.allNotFalse([null, undefined]); // true
* BooleanUtils.allNotFalse([null, false]); // false
* BooleanUtils.allNotFalse([null, true]); // true
* ```
*/

@@ -100,5 +108,7 @@ static allNotFalse(values) {

* @example
* ```ts
* BooleanUtils.anyTrue([null, undefined]); // false
* BooleanUtils.anyTrue([null, true]); // true
* BooleanUtils.anyTrue([null, false]); // false
* ```
*/

@@ -116,5 +126,7 @@ static anyTrue(values) {

* @example
* ```ts
* BooleanUtils.anyNotTrue([null, undefined]); // true
* BooleanUtils.anyNotTrue([null, true]); // true
* BooleanUtils.anyNotTrue([null, false]); // true
* ```
*/

@@ -132,5 +144,7 @@ static anyNotTrue(values) {

* @example
* ```ts
* BooleanUtils.anyFalse([null, undefined]); // false
* BooleanUtils.anyFalse([null, true]); // false
* BooleanUtils.anyFalse([null, false]); // true
* ```
*/

@@ -148,5 +162,7 @@ static anyFalse(values) {

* @example
* ```ts
* BooleanUtils.anyNotFalse([null, undefined]); // true
* BooleanUtils.anyNotFalse([null, false]); // true
* BooleanUtils.anyNotFalse([false, false]); // false
* ```
*/

@@ -164,2 +180,3 @@ static anyNotFalse(values) {

* @example
* ```ts
* BooleanUtils.isTrue(true); // true

@@ -171,2 +188,3 @@ * BooleanUtils.isTrue(1); // true

* BooleanUtils.isTrue(() => true); // true
* ```
*/

@@ -193,2 +211,3 @@ static isTrue(value) {

* @example
* ```ts
* BooleanUtils.isNotTrue(false); // true

@@ -200,2 +219,3 @@ * BooleanUtils.isNotTrue(undefined); // true

* BooleanUtils.isNotTrue(() => false); // true
* ```
*/

@@ -213,2 +233,3 @@ static isNotTrue(value) {

* @example
* ```ts
* BooleanUtils.isFalse(false); // true

@@ -220,2 +241,3 @@ * BooleanUtils.isFalse(0); // true

* BooleanUtils.isFalse(() => false); // true
* ```
*/

@@ -242,2 +264,3 @@ static isFalse(value) {

* @example
* ```ts
* BooleanUtils.isNotFalse(true); // true

@@ -249,2 +272,3 @@ * BooleanUtils.isNotFalse(undefined); // true

* BooleanUtils.isNotFalse(() => true); // true
* ```
*/

@@ -265,3 +289,5 @@ static isNotFalse(value) {

* @example
* ```ts
* BooleanUtils.toString(undefined, 'true', 'false'); // 'true'
* ```
*/

@@ -279,3 +305,5 @@ static toString(value, truthy, falsy, nil) {

* @example
* ```ts
* BooleanUtils.toStringTrueFalse(true); // 'true'
* ```
*/

@@ -293,3 +321,5 @@ static toStringTrueFalse(value) {

* @example
* ```ts
* BooleanUtils.toStringOnOff(true); // 'on'
* ```
*/

@@ -307,3 +337,5 @@ static toStringOnOff(value) {

* @example
* ```ts
* BooleanUtils.toStringYesNo(true); // 'yes'
* ```
*/

@@ -321,3 +353,5 @@ static toStringYesNo(value) {

* @example
* ```ts
* BooleanUtils.toStringYN(true); // 'Y'
* ```
*/

@@ -335,3 +369,5 @@ static toStringYN(value) {

* @example
* ```ts
* BooleanUtils.toStringTF(true); // 'T'
* ```
*/

@@ -349,3 +385,5 @@ static toStringTF(value) {

* @example
* ```ts
* BooleanUtils.toString10(true); // '1'
* ```
*/

@@ -352,0 +390,0 @@ static toString10(value) {

@@ -35,3 +35,5 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* DateUtils.addYear(new Date(2023, 8, 30), 1); // Date(2024, 8, 30)
* ```
*/

@@ -55,3 +57,5 @@ static addYear(date, amount) {

* @example
* ```ts
* DateUtils.addMonth(new Date(2023, 8, 30), 1); // Date(2023, 9, 30)
* ```
*/

@@ -75,3 +79,5 @@ static addMonth(date, amount) {

* @example
* ```ts
* DateUtils.addDay(new Date(2023, 8, 30), 1); // Date(2023, 9, 1)
* ```
*/

@@ -160,3 +166,5 @@ static addDay(date, amount) {

* @example
* ```ts
* DateUtils.getStartOfYear(new Date(2023, 8, 30)); // Date(2023, 0, 1, 0, 0, 0)
* ```
*/

@@ -180,3 +188,5 @@ static getStartOfYear(date) {

* @example
* ```ts
* DateUtils.getStartOfMonth(new Date(2023, 8, 30)); // Date(2023, 8, 1, 0, 0, 0)
* ```
*/

@@ -200,3 +210,5 @@ static getStartOfMonth(date) {

* @example
* ```ts
* DateUtils.getStartOfDay(new Date(2023, 8, 30, 12, 12, 12)); // Date(2023, 8, 30, 0, 0, 0)
* ```
*/

@@ -219,3 +231,5 @@ static getStartOfDay(date) {

* @example
* ```ts
* DateUtils.getEndOfYear(new Date(2023, 8, 30)); // Date(2023, 11, 31, 23, 59, 59)
* ```
*/

@@ -239,3 +253,5 @@ static getEndOfYear(date) {

* @example
* ```ts
* DateUtils.getEndOfMonth(new Date(2023, 8, 1)); // Date(2023, 8, 30, 23, 59, 59)
* ```
*/

@@ -259,3 +275,5 @@ static getEndOfMonth(date) {

* @example
* ```ts
* DateUtils.getEndOfDay(new Date(2023, 8, 30, 12, 12, 12)); // Date(2023, 8, 30, 23, 59, 59)
* ```
*/

@@ -293,4 +311,6 @@ static getEndOfDay(date) {

* @example
* ```ts
* DateUtils.isFirstDayOfMonth(new Date(2023, 8, 1)); // true
* DateUtils.isFirstDayOfMonth(new Date(2023, 8, 30)); // false
* ```
*/

@@ -308,4 +328,6 @@ static isFirstDayOfMonth(date) {

* @example
* ```ts
* DateUtils.isLastDayOfMonth(new Date(2023, 8, 1)); // false
* DateUtils.isLastDayOfMonth(new Date(2023, 8, 30)); // true
* ```
*/

@@ -323,4 +345,6 @@ static isLastDayOfMonth(date) {

* @example
* ```ts
* DateUtils.isLeapYear(2000); // true
* DateUtils.isLeapYear(new Date(2000, 0, 1)); // true
* ```
*/

@@ -343,3 +367,5 @@ static isLeapYear(dateYear) {

* @example
* ```ts
* DateUtils.isSameYear(new Date(2023, 1, 1), new Date(2023, 8, 30)); // true
* ```
*/

@@ -359,3 +385,5 @@ static isSameYear(date, comparison) {

* @example
* ```ts
* DateUtils.isSameMonth(new Date(2023, 8, 1), new Date(2023, 8, 30)); // true
* ```
*/

@@ -375,3 +403,5 @@ static isSameMonth(date, comparison, deepCompare = true) {

* @example
* ```ts
* DateUtils.isSameDay(new Date(), new Date()); // true
* ```
*/

@@ -389,3 +419,5 @@ static isSameDay(date, comparison, deepCompare = true) {

* @example
* ```ts
* DateUtils.isWeekend(new Date(2023, 8, 30)); // true
* ```
*/

@@ -392,0 +424,0 @@ static isWeekend(date) {

4

dist/cjs/util/JsonUtils.js

@@ -36,5 +36,7 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* JsonUtils.isJsonString(`{"foo": "bar"}`); // true
* JsonUtils.isJsonString(`[{"foo": "bar"}]`); // true
* JsonUtils.isJsonString(`[{"foo": "bar"}, {"hello": "world"}]`); // true
* ```
*/

@@ -61,3 +63,5 @@ static isJsonString(text) {

* @example
* ```ts
* JsonUtils.toJsonString({foo: 'bar'}); // `{"foo":"bar"}`
* ```
*/

@@ -64,0 +68,0 @@ static toJsonString(target) {

8

dist/cjs/util/MapUtils.js

@@ -44,3 +44,3 @@ var __defProp = Object.defineProperty;

* @param map the map to inspect
* @param callback a callback function that processes each entry, returns `false` means break
* @param callback the callback function that processes each entry, returns `false` means break
*/

@@ -76,3 +76,3 @@ static forEachBreakable(map, callback) {

* @param map the map to inspect
* @param callback a callback function that processes each entry, returns `false` means break
* @param callback the callback function that processes each entry, returns `false` means break
*/

@@ -94,3 +94,3 @@ static forEachIndexingBreakable(map, callback) {

* @param map the map to inspect
* @param callback a callback function that processes each entry
* @param callback the callback function that processes each entry
*

@@ -117,3 +117,3 @@ * @returns the tailing entry in the source map

* @param map the map to inspect
* @param callback a callback function that processes each entry
* @param callback the callback function that processes each entry
*

@@ -120,0 +120,0 @@ * @returns the tailing entry in the source map

@@ -34,3 +34,5 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* NumberUtils.isInteger(1); // true
* ```
*/

@@ -51,5 +53,7 @@ static isInteger(value) {

* @example
* ```ts
* NumberUtils.isPositive(1); // true
* NumberUtils.isPositive(0); // false
* NumberUtils.isPositive(-1); // false
* ```
*/

@@ -67,5 +71,7 @@ static isPositive(value) {

* @example
* ```ts
* NumberUtils.isNotPositive(1); // false
* NumberUtils.isNotPositive(0); // true
* NumberUtils.isNotPositive(-1); // true
* ```
*/

@@ -83,5 +89,7 @@ static isNotPositive(value) {

* @example
* ```ts
* NumberUtils.isNegative(1); // false
* NumberUtils.isNegative(0); // false
* NumberUtils.isNegative(-1); // true
* ```
*/

@@ -99,5 +107,7 @@ static isNegative(value) {

* @example
* ```ts
* NumberUtils.isNotNegative(1); // true
* NumberUtils.isNotNegative(0); // true
* NumberUtils.isNotNegative(-1); // false
* ```
*/

@@ -115,3 +125,5 @@ static isNotNegative(value) {

* @example
* ```ts
* NumberUtils.toInteger('1'); // 1
* ```
*/

@@ -137,3 +149,5 @@ static toInteger(value) {

* @example
* ```ts
* NumberUtils.toFloat('1.0'); // 1.0
* ```
*/

@@ -159,3 +173,5 @@ static toFloat(value) {

* @example
* ```ts
* NumberUtils.max([1, 2, 3]); // 3
* ```
*/

@@ -182,3 +198,5 @@ static max(values) {

* @example
* ```ts
* NumberUtils.min([1, 2, 3]); // 1
* ```
*/

@@ -205,3 +223,5 @@ static min(values) {

* @example
* ```ts
* NumberUtils.sum([1, 2, 3]); // 6
* ```
*/

@@ -219,3 +239,5 @@ static sum(values) {

* @example
* ```ts
* NumberUtils.average([1, 2, 3]); // 2
* ```
*/

@@ -222,0 +244,0 @@ static average(values) {

@@ -14,2 +14,4 @@ export declare abstract class ObjectUtils {

static defaultProps(target?: object, props?: object, overrideNil?: boolean): object | undefined;
static forEachProp(object: any, callback?: (key: string, index: number) => void): void;
static mapEachProp(object: any, callback?: (key: string, index: number) => any): any[] | undefined;
static isNil(object: any): boolean;

@@ -16,0 +18,0 @@ static isNotNil(object: any): boolean;

@@ -34,5 +34,7 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* ObjectUtils.allNil([null, undefined]); // true
* ObjectUtils.allNil([null, {}]); // false
* ObjectUtils.allNil([null, 'foobar']); // false
* ```
*/

@@ -50,5 +52,7 @@ static allNil(objects) {

* @example
* ```ts
* ObjectUtils.allNotNil([null, undefined]); // false
* ObjectUtils.allNotNil([null, {}]); // false
* ObjectUtils.allNotNil(['foo', 'bar']); // true
* ```
*/

@@ -66,5 +70,7 @@ static allNotNil(objects) {

* @example
* ```ts
* ObjectUtils.anyNil([null, undefined]); // true
* ObjectUtils.anyNil([null, {}]); // true
* ObjectUtils.anyNil(['foo', 'bar']); // false
* ```
*/

@@ -82,4 +88,6 @@ static anyNil(objects) {

* @example
* ```ts
* ObjectUtils.anyNotNil([null, undefined]); // false
* ObjectUtils.anyNotNil([null, {}]); // true
* ```
*/

@@ -97,4 +105,6 @@ static anyNotNil(objects) {

* @example
* ```ts
* ObjectUtils.allEmpty([null, undefined]); // true
* ObjectUtils.allEmpty([null, {}]); // true
* ```
*/

@@ -112,5 +122,7 @@ static allEmpty(objects) {

* @example
* ```ts
* ObjectUtils.allNotEmpty([null, undefined]); // false
* ObjectUtils.allNotEmpty([null, {}]); // false
* ObjectUtils.allNotEmpty(['foo', 'bar']); // true
* ```
*/

@@ -128,4 +140,6 @@ static allNotEmpty(objects) {

* @example
* ```ts
* ObjectUtils.anyEmpty([null, undefined]); // true
* ObjectUtils.anyEmpty([null, {}]); // true
* ```
*/

@@ -143,4 +157,6 @@ static anyEmpty(objects) {

* @example
* ```ts
* ObjectUtils.anyNotEmpty([null, undefined]); // false
* ObjectUtils.anyNotEmpty([null, {}]); // false
* ```
*/

@@ -158,3 +174,5 @@ static anyNotEmpty(objects) {

* @example
* ```ts
* ObjectUtils.clone({'foo': 'bar'});
* ```
*/

@@ -173,3 +191,5 @@ static clone(source) {

* @example
* ```ts
* ObjectUtils.cloneExclusive({'foo': 'bar'}, ['foo']);
* ```
*/

@@ -196,3 +216,5 @@ static cloneExclusive(source, keys) {

* @example
* ```ts
* ObjectUtils.cloneInclusive({'foo': 'bar'}, ['foo']);
* ```
*/

@@ -217,3 +239,5 @@ static cloneInclusive(source, keys) {

* @example
* ```ts
* ObjectUtils.defaultProps({}, {'foo': 'bar'});
* ```
*/

@@ -234,2 +258,30 @@ static defaultProps(target, props, overrideNil = true) {

/**
* Processes each prop key in the object
*
* @param object the object to inspect
* @param callback the callback function that processes each prop key
*/
static forEachProp(object, callback) {
if (!object || !this.isPlain(object) || !callback) {
return;
}
Object.keys(object).filter((key) => Object.prototype.hasOwnProperty.call(object, key)).forEach((key, index) => {
callback(key, index);
});
}
/**
* Processes and map each prop key in the object
*
* @param object the object to inspect
* @param callback the callback function that processes each prop key
*/
static mapEachProp(object, callback) {
if (!object || !this.isPlain(object) || !callback) {
return void 0;
}
return Object.keys(object).filter((key) => Object.prototype.hasOwnProperty.call(object, key)).map((key, index) => {
return callback(key, index);
});
}
/**
* Returns whether the given object is null or undefined

@@ -242,5 +294,7 @@ *

* @example
* ```ts
* ObjectUtils.isNil(null); // true
* ObjectUtils.isNil(undefined); // true
* ObjectUtils.isNil({}); // false
* ```
*/

@@ -258,4 +312,6 @@ static isNil(object) {

* @example
* ```ts
* ObjectUtils.isNotNil('foobar'); // true
* ObjectUtils.isNotNil([]); // true
* ```
*/

@@ -273,4 +329,6 @@ static isNotNil(object) {

* @example
* ```ts
* ObjectUtils.isNull(null); // true
* ObjectUtils.isNull({}); // false
* ```
*/

@@ -288,3 +346,5 @@ static isNull(object) {

* @example
* ```ts
* ObjectUtils.isNotNull('foobar'); // true
* ```
*/

@@ -302,4 +362,6 @@ static isNotNull(object) {

* @example
* ```ts
* ObjectUtils.isUndefined(undefined); // true
* ObjectUtils.isUndefined({}); // false
* ```
*/

@@ -317,3 +379,5 @@ static isUndefined(object) {

* @example
* ```ts
* ObjectUtils.isNotUndefined('foobar'); // true
* ```
*/

@@ -331,2 +395,3 @@ static isNotUndefined(object) {

* @example
* ```ts
* ObjectUtils.isEmpty(null); // true

@@ -336,2 +401,3 @@ * ObjectUtils.isEmpty(undefined); // true

* ObjectUtils.isEmpty('foobar'); // false
* ```
*/

@@ -362,4 +428,6 @@ static isEmpty(object) {

* @example
* ```ts
* ObjectUtils.isNotEmpty('foobar'); // true
* ObjectUtils.isNotEmpty([undefined, null]); // true
* ```
*/

@@ -377,4 +445,6 @@ static isNotEmpty(object) {

* @example
* ```ts
* ObjectUtils.isPlain(undefined); // false
* ObjectUtils.isPlain({foo: 'bar'}); // true
* ```
*/

@@ -392,2 +462,3 @@ static isPlain(object) {

* @example
* ```ts
* ObjectUtils.isPrimitive(undefined); // true

@@ -397,2 +468,3 @@ * ObjectUtils.isPrimitive(true); // true

* ObjectUtils.isPrimitive({foo: 'bar'}); // false
* ```
*/

@@ -410,4 +482,6 @@ static isPrimitive(object) {

* @example
* ```ts
* ObjectUtils.isPromise({}); // false
* ObjectUtils.isPromise('foobar'); // false
* ```
*/

@@ -425,4 +499,6 @@ static isPromise(object) {

* @example
* ```ts
* ObjectUtils.isPrototype({}); // false
* ObjectUtils.isPrototype('foobar'); // false
* ```
*/

@@ -445,4 +521,6 @@ static isPrototype(object) {

* @example
* ```ts
* ObjectUtils.isRegular(/[0-9a-zA-Z]+/g); // true
* ObjectUtils.isRegular('/[0-9a-zA-Z]+/g'); // false
* ```
*/

@@ -461,3 +539,5 @@ static isRegular(object) {

* @example
* ```ts
* ObjectUtils.getProp({foo: {bar: 'foobar'}}, 'foo.bar'); // foobar
* ```
*/

@@ -486,4 +566,6 @@ static getProp(object, prop) {

* @example
* ```ts
* ObjectUtils.hasProp({foo: 'bar'}, 'foo'); // true
* ObjectUtils.hasProp({foo: 'bar'}, 'bar'); // false
* ```
*/

@@ -501,3 +583,5 @@ static hasProp(object, prop) {

* @example
* ```ts
* ObjectUtils.setProp({}, 'foo', 'bar');
* ```
*/

@@ -517,3 +601,5 @@ static setProp(object, prop, value) {

* @example
* ```ts
* ObjectUtils.keys({foo: 'bar'}); // ['foo']
* ```
*/

@@ -520,0 +606,0 @@ static keys(object) {

@@ -33,3 +33,5 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* RandomUtils.randomBoolean();
* ```
*/

@@ -47,3 +49,5 @@ static randomBoolean() {

* @example
* ```ts
* RandomUtils.randomElement(['1', '2', '3']);
* ```
*/

@@ -62,3 +66,5 @@ static randomElement(array) {

* @example
* ```ts
* RandomUtils.randomElements(['1', '2', '3'], 2);
* ```
*/

@@ -87,4 +93,6 @@ static randomElements(array, size) {

* @example
* ```ts
* RandomUtils.randomInteger(1, 10);
* RandomUtils.randomInteger(-6, 8);
* ```
*/

@@ -105,4 +113,6 @@ static randomInteger(minValue, maxValue) {

* @example
* ```ts
* RandomUtils.randomIntegers(3, 1, 10);
* RandomUtils.randomIntegers(3, -6, 8);
* ```
*/

@@ -132,5 +142,7 @@ static randomIntegers(size, minValue, maxValue) {

* @example
* ```ts
* RandomUtils.randomNumber(1.1, 1.2);
* RandomUtils.randomNumber(-3.6, 2.8);
* RandomUtils.randomNumber(-3.6, -2.8);
* ```
*/

@@ -152,4 +164,6 @@ static randomNumber(minValue, maxValue) {

* @example
* ```ts
* RandomUtils.randomNumbers(3, 1.1, 1.2);
* RandomUtils.randomNumbers(3, -3.6, 2.8);
* ```
*/

@@ -180,3 +194,5 @@ static randomNumbers(size, minValue, maxValue) {

* @example
* ```ts
* RandomUtils.randomString(8);
* ```
*/

@@ -209,3 +225,5 @@ static randomString(minLength, maxLength, characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") {

* @example
* ```ts
* RandomUtils.randomStrings(3, 6, 10);
* ```
*/

@@ -212,0 +230,0 @@ static randomStrings(size, minLength, maxLength, characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") {

@@ -35,3 +35,5 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* RegexUtils.compilePattern('[a-zA-Z0-9]+', 'g');
* ```
*/

@@ -56,4 +58,6 @@ static compilePattern(pattern, flags) {

* @example
* ```ts
* RegexUtils.escapePattern('\\'); // '\\\\'
* RegexUtils.escapePattern('-+='); // '\\-\\+='
* ```
*/

@@ -73,3 +77,5 @@ static escapePattern(pattern) {

* @example
* ```ts
* RegexUtils.extractWords('foo, & bar'); // ['foo', 'bar']
* ```
*/

@@ -88,5 +94,7 @@ static extractWords(text, search = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g) {

* @example
* ```ts
* RegexUtils.isCompilable(undefined); // false
* RegexUtils.isCompilable('foobar'); // true
* RegexUtils.isCompilable('[a-zA-Z0-9]+', 'g'); // true
* ```
*/

@@ -112,5 +120,7 @@ static isCompilable(pattern, flags) {

* @example
* ```ts
* RegexUtils.isAlphabetic('abc'); // true
* RegexUtils.isAlphabetic('abc123'); // false
* RegexUtils.isAlphabetic('123456'); // false
* ```
*/

@@ -128,5 +138,7 @@ static isAlphabetic(text) {

* @example
* ```ts
* RegexUtils.isAlphanumeric(undefined); // false
* RegexUtils.isAlphanumeric('abc123'); // true
* RegexUtils.isAlphanumeric('--$$##'); // false
* ```
*/

@@ -144,5 +156,7 @@ static isAlphanumeric(text) {

* @example
* ```ts
* RegexUtils.isNumeric(undefined); // false
* RegexUtils.isNumeric('abc123'); // false
* RegexUtils.isNumeric('123456'); // true
* ```
*/

@@ -149,0 +163,0 @@ static isNumeric(text) {

@@ -37,4 +37,6 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* StringUtils.allEmpty([null, undefined]); // true
* StringUtils.allEmpty([null, 'true']); // false
* ```
*/

@@ -52,5 +54,7 @@ static allEmpty(texts) {

* @example
* ```ts
* StringUtils.allNotEmpty([null, undefined]); // false
* StringUtils.allNotEmpty([null, 'world']); // false
* StringUtils.allNotEmpty(['foo', 'bar']); // true
* ```
*/

@@ -68,4 +72,6 @@ static allNotEmpty(texts) {

* @example
* ```ts
* StringUtils.allBlank([null, undefined]); // true
* StringUtils.allBlank([null, 'true']); // false
* ```
*/

@@ -83,5 +89,7 @@ static allBlank(texts) {

* @example
* ```ts
* StringUtils.allNotBlank([null, undefined]); // false
* StringUtils.allNotBlank([null, 'world']); // false
* StringUtils.allNotBlank(['foo', 'bar']); // true
* ```
*/

@@ -99,4 +107,6 @@ static allNotBlank(texts) {

* @example
* ```ts
* StringUtils.anyEmpty([null, undefined]); // true
* StringUtils.anyEmpty(['foo', 'bar']); // false
* ```
*/

@@ -114,4 +124,6 @@ static anyEmpty(texts) {

* @example
* ```ts
* StringUtils.anyNotEmpty([null, undefined]); // false
* StringUtils.anyNotEmpty([null, 'world']); // true
* ```
*/

@@ -129,4 +141,6 @@ static anyNotEmpty(texts) {

* @example
* ```ts
* StringUtils.anyBlank([null, undefined]); // true
* StringUtils.anyBlank(['foo', 'bar']); // false
* ```
*/

@@ -144,4 +158,6 @@ static anyBlank(texts) {

* @example
* ```ts
* StringUtils.anyNotBlank([null, undefined]); // false
* StringUtils.anyNotBlank([null, 'world']); // true
* ```
*/

@@ -161,2 +177,3 @@ static anyNotBlank(texts) {

* @example
* ```ts
* StringUtils.abbreviate('foobar', -1); // 'foobar'

@@ -167,2 +184,3 @@ * StringUtils.abbreviate('foobar', 0); // ''

* StringUtils.abbreviate('foobar', 10); // 'foobar'
* ```
*/

@@ -190,4 +208,6 @@ static abbreviate(text, width = -1, placeholder = "...") {

* @example
* ```ts
* StringUtils.appendIfMissing('foo', 'bar'); // 'foobar'
* StringUtils.appendIfMissing('foobar', 'bar'); // 'foobar'
* ```
*/

@@ -206,4 +226,6 @@ static appendIfMissing(text, suffix) {

* @example
* ```ts
* StringUtils.appendIfMissingIgnoreCase('foo', 'bar'); // 'foobar'
* StringUtils.appendIfMissingIgnoreCase('foobar', 'BAR'); // 'foobar'
* ```
*/

@@ -214,11 +236,13 @@ static appendIfMissingIgnoreCase(text, suffix) {

/**
* Returns the first letter uppercase representation of the given string
*
* @param text the source string to check
*
* @returns the first letter uppercase representation of the given string
@example
StringUtils.capitalizeFirst('fooBar'); // 'FooBar'
*/
* Returns the first letter uppercase representation of the given string
*
* @param text the source string to check
*
* @returns the first letter uppercase representation of the given string
*
* @example
* ```ts
* StringUtils.capitalizeFirst('fooBar'); // 'FooBar'
* ```
*/
static capitalizeFirst(text) {

@@ -228,11 +252,13 @@ return !text ? text : text.charAt(0).toUpperCase() + text.substring(1);

/**
* Returns the first letter uppercase and others lowercase representation of the given string
*
* @param text the source string to check
*
* @returns the letter uppercase and others lowercase representation of the given string
@example
StringUtils.capitalizeFirstLowerTail('fooBar'); // 'Foobar'
*/
* Returns the first letter uppercase and others lowercase representation of the given string
*
* @param text the source string to check
*
* @returns the letter uppercase and others lowercase representation of the given string
*
* @example
* ```ts
* StringUtils.capitalizeFirstLowerTail('fooBar'); // 'Foobar'
* ```
*/
static capitalizeFirstLowerTail(text) {

@@ -252,2 +278,3 @@ var _a;

* @example
* ```ts
* StringUtils.center('foobar', -1); // 'foobar'

@@ -258,2 +285,3 @@ * StringUtils.center('foobar', 0); // ''

* StringUtils.center('foobar', 10); // ' foobar '
* ```
*/

@@ -278,4 +306,6 @@ static center(text, width = -1, placeholder = " ") {

* @example
* ```ts
* StringUtils.defaultString(undefined); // ''
* StringUtils.defaultString(null); // ''
* ```
*/

@@ -294,3 +324,5 @@ static defaultString(text) {

* @example
* ```ts
* StringUtils.defaultIfEmpty(undefined, 'foobar'); // 'foobar'
* ```
*/

@@ -309,3 +341,5 @@ static defaultIfEmpty(text, defaultValue) {

* @example
* ```ts
* StringUtils.defaultIfBlank(undefined, 'foobar'); // 'foobar'
* ```
*/

@@ -324,4 +358,6 @@ static defaultIfBlank(text, defaultValue) {

* @example
* ```ts
* StringUtils.endsWith('foobar', 'bar'); // true
* StringUtils.endsWith('hello', 'bar'); // false
* ```
*/

@@ -346,4 +382,6 @@ static endsWith(text, suffix) {

* @example
* ```ts
* StringUtils.endsWithIgnoreCase('foobar', 'BAR'); // true
* StringUtils.endsWithIgnoreCase('hello', 'BAR'); // false
* ```
*/

@@ -368,4 +406,6 @@ static endsWithIgnoreCase(text, suffix) {

* @example
* ```ts
* StringUtils.endsWithAny('foobar', ['foo', 'bar']); // true
* StringUtils.endsWithAny('hello', ['foo', 'bar']); // false
* ```
*/

@@ -387,4 +427,6 @@ static endsWithAny(text, suffixes) {

* @example
* ```ts
* StringUtils.endsWithAnyIgnoreCase('foobar', ['FOO', 'BAR']); // true
* StringUtils.endsWithAnyIgnoreCase('hello', ['FOO', 'BAR']); // false
* ```
*/

@@ -406,5 +448,7 @@ static endsWithAnyIgnoreCase(text, suffixes) {

* @example
* ```ts
* StringUtils.equals(undefined, null); // false
* StringUtils.equals('foo', 'foo'); // true
* StringUtils.equals('foo', 'bar'); // false
* ```
*/

@@ -429,3 +473,5 @@ static equals(text, comparison) {

* @example
* ```ts
* StringUtils.equalsIgnoreCase('foo', 'FOO'); // true
* ```
*/

@@ -450,3 +496,5 @@ static equalsIgnoreCase(text, comparison) {

* @example
* ```ts
* StringUtils.equalsAny('foo', ['foo', 'bar']); // true
* ```
*/

@@ -465,3 +513,5 @@ static equalsAny(text, comparisons) {

* @example
* ```ts
* StringUtils.equalsAnyIgnoreCase('foo', ['FOO', 'bar']); // true
* ```
*/

@@ -482,3 +532,5 @@ static equalsAnyIgnoreCase(text, comparisons) {

* @example
* ```ts
* StringUtils.escapeHtml('<div>foobar<div>'); // '&lt;div&gt;foobar&lt;div&gt;'
* ```
*/

@@ -506,3 +558,5 @@ static escapeHtml(text) {

* @example
* ```ts
* StringUtils.unescapeHtml('&lt;div&gt;foobar&lt;div&gt;'); // '<div>foobar<div>'
* ```
*/

@@ -530,3 +584,5 @@ static unescapeHtml(text) {

* @example
* ```ts
* StringUtils.filterIgnoreEmpty([null, undefined, '', 'foobar']); // ['foobar']
* ```
*/

@@ -548,3 +604,5 @@ static filterIgnoreEmpty(texts) {

* @example
* ```ts
* StringUtils.filterIgnoreEmpty([null, undefined, ' ', 'foobar']); // ['foobar']
* ```
*/

@@ -567,5 +625,7 @@ static filterIgnoreBlank(texts) {

* @example
* ```ts
* StringUtils.formatBrace('foo{}', 'bar'); // 'foobar'
* StringUtils.formatBrace('foobar{}'); // 'foobar{}'
* StringUtils.formatBrace('hello {}, foo{}', 'world', 'bar'); // 'hello world, foobar'
* ```
*/

@@ -593,5 +653,7 @@ static formatBrace(text, ...params) {

* @example
* ```ts
* StringUtils.formatPercent("foo%s", "bar"); // "foobar"
* StringUtils.formatPercent("foobar %d", 2023); // "foobar 2023"
* StringUtils.formatPercent("hello %s, foo%s", "world", "bar"); // "hello world, foobar"
* ```
*/

@@ -690,2 +752,3 @@ static formatPercent(text, ...params) {

* @example
* ```ts
* StringUtils.formatPlaceholder("foo{bar}", {bar: "bar"}); // "foobar"

@@ -695,2 +758,3 @@ * StringUtils.formatPlaceholder("foobar{none}"); // "foobar{none}"

* StringUtils.formatPlaceholder("hello {name}, foo{bar}", {name: "world", bar: "bar"}); // "hello world, foobar"
* ```
*/

@@ -717,4 +781,6 @@ static formatPlaceholder(text, params) {

* @example
* ```ts
* StringUtils.fromChars(undefined); // undefined
* StringUtils.fromChars(['f', 'o', 'o', 'b', 'a', 'r']); // 'foobar'
* ```
*/

@@ -742,4 +808,6 @@ static fromChars(texts) {

* @example
* ```ts
* StringUtils.isEmpty(undefined); // true
* StringUtils.isEmpty('foobar'); // false
* ```
*/

@@ -757,3 +825,5 @@ static isEmpty(text) {

* @example
* ```ts
* StringUtils.isNotEmpty('foobar'); // true
* ```
*/

@@ -774,4 +844,6 @@ static isNotEmpty(text) {

* @example
* ```ts
* StringUtils.isBlank(undefined); // true
* StringUtils.isBlank('foobar'); // false
* ```
*/

@@ -789,3 +861,5 @@ static isBlank(text) {

* @example
* ```ts
* StringUtils.isNotBlank('foobar'); // true
* ```
*/

@@ -804,3 +878,5 @@ static isNotBlank(text) {

* @example
* ```ts
* StringUtils.includes('foobar', 'foo'); // true
* ```
*/

@@ -819,3 +895,5 @@ static includes(text, comparison) {

* @example
* ```ts
* StringUtils.includesIgnoreCase('foobar', 'FOO'); // true
* ```
*/

@@ -835,3 +913,5 @@ static includesIgnoreCase(text, comparison) {

* @example
* ```ts
* StringUtils.includesAny('foobar', ['foo', 'bar']); // true
* ```
*/

@@ -853,3 +933,5 @@ static includesAny(text, comparisons) {

* @example
* ```ts
* StringUtils.includesAnyIgnoreCase('foobar', ['FOO', 'world']); // true
* ```
*/

@@ -872,5 +954,7 @@ static includesAnyIgnoreCase(text, comparisons) {

* @example
* ```ts
* StringUtils.joinWith('foobar'); // 'foobar'
* StringUtils.joinWith(['foo', 'bar'], undefined); // 'foobar'
* StringUtils.joinWith(['foo', 'bar', 'world'], undefined, (text => text !== 'world')); // 'foobar'
* ```
*/

@@ -899,4 +983,6 @@ static joinWith(texts, separator, filter) {

* @example
* ```ts
* StringUtils.left('foobar', 3); // 'foo'
* StringUtils.left('foobar', 10); // 'foobar'
* ```
*/

@@ -921,4 +1007,6 @@ static left(text, length) {

* @example
* ```ts
* StringUtils.right('foobar', 3); // 'bar'
* StringUtils.right('foobar', 10); // 'foobar'
* ```
*/

@@ -943,4 +1031,6 @@ static right(text, length) {

* @example
* ```ts
* StringUtils.prependIfMissing('bar', 'foo'); // 'foobar'
* StringUtils.prependIfMissing('foobar', 'foo'); // 'foobar'
* ```
*/

@@ -959,4 +1049,6 @@ static prependIfMissing(text, prefix) {

* @example
* ```ts
* StringUtils.prependIfMissingIgnoreCase('bar', 'foo'); // 'foobar'
* StringUtils.prependIfMissingIgnoreCase('foobar', 'FOO'); // 'foobar'
* ```
*/

@@ -974,4 +1066,6 @@ static prependIfMissingIgnoreCase(text, prefix) {

* @example
* ```ts
* StringUtils.quoteSingle(undefined); // undefined
* StringUtils.quoteSingle('foobar'); // '\'foobar\''
* ```
*/

@@ -989,4 +1083,6 @@ static quoteSingle(text) {

* @example
* ```ts
* StringUtils.quoteSingle(undefined); // undefined
* StringUtils.quoteSingle('foobar'); // '"foobar"'
* ```
*/

@@ -1004,5 +1100,7 @@ static quoteDouble(text) {

* @example
* ```ts
* StringUtils.unquote(undefined); // undefined
* StringUtils.unquote('\'foobar\''); // 'foobar'
* StringUtils.unquote('"foobar"'); // 'foobar'
* ```
*/

@@ -1021,5 +1119,7 @@ static unquote(text) {

* @example
* ```ts
* StringUtils.removeAll(undefined, undefined); // undefined
* StringUtils.removeAll('foobar-foobar', undefined); // 'foobar-foobar'
* StringUtils.removeAll('foobar-foobar', 'bar'); // 'foo-foo'
* ```
*/

@@ -1038,5 +1138,7 @@ static removeAll(text, search) {

* @example
* ```ts
* StringUtils.removeAllIgnoreCase(undefined, undefined); // undefined
* StringUtils.removeAllIgnoreCase('foobar-foobar', undefined); // 'foobar-foobar'
* StringUtils.removeAllIgnoreCase('foobar-foobar', 'BAR'); // 'foo-foo'
* ```
*/

@@ -1055,5 +1157,7 @@ static removeAllIgnoreCase(text, search) {

* @example
* ```ts
* StringUtils.removeFirst(undefined, undefined); // undefined
* StringUtils.removeFirst('foobar-foobar', undefined); // 'foobar-foobar'
* StringUtils.removeFirst('foobar-foobar', 'bar'); // 'foo-foobar'
* ```
*/

@@ -1072,5 +1176,7 @@ static removeFirst(text, search) {

* @example
* ```ts
* StringUtils.removeFirstIgnoreCase(undefined, undefined); // undefined
* StringUtils.removeFirstIgnoreCase('foobar-foobar', undefined); // 'foobar-foobar'
* StringUtils.removeFirstIgnoreCase('foobar-foobar', 'BAR'); // 'foo-foobar'
* ```
*/

@@ -1089,3 +1195,5 @@ static removeFirstIgnoreCase(text, search) {

* @example
* ```ts
* StringUtils.removeEquals(['foo', 'bar'], ['bar']); // ['foo']
* ```
*/

@@ -1104,3 +1212,5 @@ static removeEquals(texts, excludes) {

* @example
* ```ts
* StringUtils.removeEqualsIgnoreCase(['foo', 'bar'], ['BAR']); // ['foo']
* ```
*/

@@ -1119,3 +1229,5 @@ static removeEqualsIgnoreCase(texts, excludes) {

* @example
* ```ts
* StringUtils.removeIncludes(['foo', 'bar'], ['ar']); // ['foo']
* ```
*/

@@ -1134,3 +1246,5 @@ static removeIncludes(texts, excludes) {

* @example
* ```ts
* StringUtils.removeIncludesIgnoreCase(['foo', 'bar'], ['AR']); // ['foo']
* ```
*/

@@ -1149,4 +1263,6 @@ static removeIncludesIgnoreCase(texts, excludes) {

* @example
* ```ts
* StringUtils.removeStart('foobar', 'hello'); // 'foobar'
* StringUtils.removeStart('foobar', 'foo'); // 'bar'
* ```
*/

@@ -1165,4 +1281,6 @@ static removeStart(text, remove) {

* @example
* ```ts
* StringUtils.removeStartIgnoreCase('foobar', 'Hello'); // 'foobar'
* StringUtils.removeStartIgnoreCase('foobar', 'Foo'); // 'bar'
* ```
*/

@@ -1181,4 +1299,6 @@ static removeStartIgnoreCase(text, remove) {

* @example
* ```ts
* StringUtils.removeEnd('foobar', 'hello'); // 'foobar'
* StringUtils.removeEnd('foobar', 'bar'); // 'foo'
* ```
*/

@@ -1197,4 +1317,6 @@ static removeEnd(text, remove) {

* @example
* ```ts
* StringUtils.removeEndIgnoreCase('foobar', 'Hello'); // 'foobar'
* StringUtils.removeEndIgnoreCase('foobar', 'Bar'); // 'foo'
* ```
*/

@@ -1214,5 +1336,7 @@ static removeEndIgnoreCase(text, remove) {

* @example
* ```ts
* StringUtils.replaceAll(undefined, undefined, undefined); // undefined
* StringUtils.replaceAll('foobar-foobar', undefined, 'hello'); // 'foobar-foobar'
* StringUtils.replaceAll('foobar-foobar', 'foobar', 'hello'); // 'hello-hello'
* ```
*/

@@ -1232,5 +1356,7 @@ static replaceAll(text, search, replace) {

* @example
* ```ts
* StringUtils.replaceAllIgnoreCase(undefined, undefined, undefined); // undefined
* StringUtils.replaceAllIgnoreCase('foobar-foobar', undefined, 'hello'); // 'foobar-foobar'
* StringUtils.replaceAllIgnoreCase('foobar-foobar', 'FOOBAR', 'hello'); // 'hello-hello'
* ```
*/

@@ -1250,5 +1376,7 @@ static replaceAllIgnoreCase(text, search, replace) {

* @example
* ```ts
* StringUtils.replaceFirst(undefined, undefined, undefined); // undefined
* StringUtils.replaceFirst('foobar-foobar', 'foobar', undefined); // 'foobar-foobar'
* StringUtils.replaceFirst('foobar-foobar', 'foobar', 'hello'); // 'hello-foobar'
* ```
*/

@@ -1268,5 +1396,7 @@ static replaceFirst(text, search, replace) {

* @example
* ```ts
* StringUtils.replaceFirstIgnoreCase(undefined, undefined, undefined); // undefined
* StringUtils.replaceFirstIgnoreCase('foobar-foobar', 'foobar', undefined); // 'foobar-foobar'
* StringUtils.replaceFirstIgnoreCase('foobar-foobar', 'FOOBAR', 'hello'); // 'hello-foobar'
* ```
*/

@@ -1286,4 +1416,6 @@ static replaceFirstIgnoreCase(text, search, replace) {

* @example
* ```ts
* StringUtils.reverse('foobar'); // 'raboof'
* StringUtils.reverse('foobar', 1, 5); // 'aboo'
* ```
*/

@@ -1308,4 +1440,6 @@ static reverse(text, startInclusive, endExclusive) {

* @example
* ```ts
* StringUtils.split('foo,bar'); // ['foo', 'bar']
* StringUtils.split('hello | world | wonderful', '|', 2); // ['hello', 'world']
* ```
*/

@@ -1331,4 +1465,6 @@ static split(text, delimiter = ",", max = -1, trim = true) {

* @example
* ```ts
* StringUtils.startsWith('foobar', 'foo'); // true
* StringUtils.startsWith('hello', 'bar'); // false
* ```
*/

@@ -1353,4 +1489,6 @@ static startsWith(text, prefix) {

* @example
* ```ts
* StringUtils.startsWithIgnoreCase('foobar', 'FOO'); // true
* StringUtils.startsWithIgnoreCase('hello', 'BAR'); // false
* ```
*/

@@ -1375,4 +1513,6 @@ static startsWithIgnoreCase(text, prefix) {

* @example
* ```ts
* StringUtils.startsWithAny('foobar', ['foo', 'bar']); // true
* StringUtils.startsWithAny('hello', ['foo', 'bar']); // false
* ```
*/

@@ -1394,4 +1534,6 @@ static startsWithAny(text, prefixes) {

* @example
* ```ts
* StringUtils.startsWithAnyIgnoreCase('foobar', ['FOO', 'BAR']); // true
* StringUtils.startsWithAnyIgnoreCase('hello', ['FOO', 'BAR']); // false
* ```
*/

@@ -1413,3 +1555,5 @@ static startsWithAnyIgnoreCase(text, prefixes) {

* @example
* ```ts
* StringUtils.substringAfter("foo/bar/foo/bar", "/"); // 'bar/foo/bar'
* ```
*/

@@ -1432,3 +1576,5 @@ static substringAfter(text, separator) {

* @example
* ```ts
* StringUtils.substringAfterLast("foo/bar/foo/bar", "/"); // 'bar'
* ```
*/

@@ -1450,3 +1596,5 @@ static substringAfterLast(text, separator) {

* @example
* ```ts
* StringUtils.substringBefore("foo/bar/foo/bar", "/"); // 'foo'
* ```
*/

@@ -1469,3 +1617,5 @@ static substringBefore(text, separator) {

* @example
* ```ts
* StringUtils.substringBeforeLast("foo/bar/foo/bar", "/"); // 'foo/bar/foo'
* ```
*/

@@ -1487,4 +1637,6 @@ static substringBeforeLast(text, separator) {

* @example
* ```ts
* StringUtils.toChars(undefined); // undefined
* StringUtils.toChars('foobar'); // ['f', 'o', 'o', 'b', 'a', 'r']
* ```
*/

@@ -1503,4 +1655,6 @@ static toChars(text) {

* @example
* ```ts
* StringUtils.toCamelCase('FOO BAR'); // 'fooBar'
* StringUtils.toCamelCase('--FOO-BAR--'); // 'fooBar'
* ```
*/

@@ -1526,4 +1680,6 @@ static toCamelCase(text, pattern) {

* @example
* ```ts
* StringUtils.toKebabCase('FOO BAR'); // 'foo-bar'
* StringUtils.toKebabCase('--FOO-BAR--'); // 'foo-bar'
* ```
*/

@@ -1548,3 +1704,5 @@ static toKebabCase(text, pattern) {

* @example
* ```ts
* StringUtils.trim("foobar", true); // 'foobar'
* ```
*/

@@ -1551,0 +1709,0 @@ static trim(text, emptyAsNull) {

@@ -34,4 +34,6 @@ var __defProp = Object.defineProperty;

* @example
* ```ts
* TimeUtils.sleep();
* TimeUtils.sleep().then(() => {});
* ```
*/

@@ -38,0 +40,0 @@ static sleep(microseconds = 1e3) {

@@ -14,2 +14,4 @@ export declare abstract class ObjectUtils {

static defaultProps(target?: object, props?: object, overrideNil?: boolean): object | undefined;
static forEachProp(object: any, callback?: (key: string, index: number) => void): void;
static mapEachProp(object: any, callback?: (key: string, index: number) => any): any[] | undefined;
static isNil(object: any): boolean;

@@ -16,0 +18,0 @@ static isNotNil(object: any): boolean;

@@ -130,2 +130,26 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";

}, {
key: "forEachProp",
value: function forEachProp(object, callback) {
if (!object || !this.isPlain(object) || !callback) {
return;
}
Object.keys(object).filter(function (key) {
return Object.prototype.hasOwnProperty.call(object, key);
}).forEach(function (key, index) {
callback(key, index);
});
}
}, {
key: "mapEachProp",
value: function mapEachProp(object, callback) {
if (!object || !this.isPlain(object) || !callback) {
return undefined;
}
return Object.keys(object).filter(function (key) {
return Object.prototype.hasOwnProperty.call(object, key);
}).map(function (key, index) {
return callback(key, index);
});
}
}, {
key: "isNil",

@@ -252,5 +276,5 @@ value: function isNil(object) {

var result = [];
for (var key in Object(object)) {
if (key !== 'constructor' && this.hasProp(object, key)) {
result.push(key);
for (var _key in Object(object)) {
if (_key !== 'constructor' && this.hasProp(object, _key)) {
result.push(_key);
}

@@ -257,0 +281,0 @@ }

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TsLangUtils=t():e.TsLangUtils=t()}(self,(function(){return function(){var e={317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},786:function(e,t,n){var r=n(317);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,n){var r=n(281);function u(e,t){for(var n=0;n<t.length;n++){var u=t[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(e,r(u.key),u)}}e.exports=function(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},746:function(e,t,n){var r=n(508);e.exports=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var u=0,i=function(){};return{s:i,n:function(){return u>=e.length?{done:!0}:{done:!1,value:e[u++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}},e.exports.__esModule=!0,e.exports.default=e.exports},682:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,i,o,a=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){s=!0,u=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw u}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},114:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,n){var r=n(180),u=n(249),i=n(508),o=n(20);e.exports=function(e,t){return r(e)||u(e,t)||i(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},44:function(e,t,n){var r=n(786),u=n(682),i=n(508),o=n(114);e.exports=function(e){return r(e)||u(e)||i(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,n){var r=n(944).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var u=n.call(e,t||"default");if("object"!=r(u))return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,n){var r=n(944).default,u=n(224);e.exports=function(e){var t=u(e,"string");return"symbol"==r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,n){var r=n(317);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var u=t[r];if(void 0!==u)return u.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{ArrayUtils:function(){return g},BooleanUtils:function(){return p},DateUtils:function(){return d},IgnorableError:function(){},JsonUtils:function(){return k},MapUtils:function(){return x},NumberUtils:function(){return E},ObjectUtils:function(){return v},RandomUtils:function(){return N},RegexUtils:function(){return y},StringUtils:function(){return h},ThreadUtils:function(){return S},TreeUtils:function(){return I},UnsupportedError:function(){}});var e=n(746),t=n.n(e),u=n(944),i=n.n(u),o=n(44),a=n.n(o),l=n(486),s=n.n(l),f=n(702),c=n.n(f),v=function(){function e(){s()(this,e)}return c()(e,null,[{key:"allNil",value:function(e){var t=this;return!e||0===e.length||(null==e?void 0:e.every((function(e){return t.isNil(e)})))}},{key:"allNotNil",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotNil(e)}))}},{key:"anyNil",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isNil(e)}))}},{key:"anyNotNil",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isNotNil(e)}))}},{key:"allEmpty",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isEmpty(e)}))}},{key:"allNotEmpty",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotEmpty(e)}))}},{key:"anyEmpty",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isEmpty(e)}))}},{key:"anyNotEmpty",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isNotEmpty(e)}))}},{key:"clone",value:function(e){return e&&this.isPlain(e)?Object.assign({},e):void 0}},{key:"cloneExclusive",value:function(e,t){var n=this;if(e&&this.isPlain(e)){if(!t||0===t.length)return this.clone(e);var r={};return Object.entries(e).filter((function(e){return!t.includes(e[0])})).forEach((function(e){return n.setProp(r,e[0],e[1])})),r}}},{key:"cloneInclusive",value:function(e,t){var n=this;if(e&&this.isPlain(e)&&t&&0!==t.length){var r={};return Object.entries(e).filter((function(e){return t.includes(e[0])})).forEach((function(e){return n.setProp(r,e[0],e[1])})),r}}},{key:"defaultProps",value:function(e,t){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!this.isPlain(e))return t;if(!t||!this.isPlain(t))return e;var u={};return Object.entries(t).filter((function(t){return!Object.prototype.hasOwnProperty.call(e,t[0])||r&&(void 0===e[t[0]]||null===e[t[0]])})).forEach((function(e){return n.setProp(u,e[0],e[1])})),Object.assign(e,u)}},{key:"isNil",value:function(e){return null==e}},{key:"isNotNil",value:function(e){return!this.isNil(e)}},{key:"isNull",value:function(e){return null===e}},{key:"isNotNull",value:function(e){return!this.isNull(e)}},{key:"isUndefined",value:function(e){return void 0===e}},{key:"isNotUndefined",value:function(e){return!this.isUndefined(e)}},{key:"isEmpty",value:function(e){return!e||("string"==typeof e||Array.isArray(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"===i()(e)&&0===(null===(t=this.keys(e))||void 0===t?void 0:t.length));var t}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isPlain",value:function(e){return"object"===i()(e)&&"[object Object]"===Object.prototype.toString.call(e)}},{key:"isPrimitive",value:function(e){return null==e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||"symbol"===i()(e)||"bigint"==typeof e||"function"==typeof e}},{key:"isPromise",value:function(e){return"object"===i()(e)&&"[object Promise]"===Object.prototype.toString.call(e)}},{key:"isPrototype",value:function(e){if("object"!==i()(e))return!1;var t=e.constructor;return e===("function"==typeof t?t.prototype:e.prototype)}},{key:"isRegular",value:function(e){return e instanceof RegExp||"object"===i()(e)&&"[object RegExp]"===Object.prototype.toString.call(e)}},{key:"getProp",value:function(e,t){if("object"===i()(e)&&t&&0!==t.length){if(!t.includes("."))return e[t];var n=t.replace(/\[/g,".").replace(/]/g,"").split(".");if(n&&0!==n.length)return 1===n.length?e[n[0]]:n.reduce((function(e,t){return(e||{})[t]}),e)}}},{key:"hasProp",value:function(e,t){return"object"===i()(e)&&!!t&&t.length>0&&Object.prototype.hasOwnProperty.call(e,t)}},{key:"setProp",value:function(e,t,n){this.isPlain(e)&&t&&(e[t]=n)}},{key:"keys",value:function(e){if(!e)return[];if(!this.isPrototype(e))return Object.keys(e);var t=[];for(var n in Object(e))"constructor"!==n&&this.hasProp(e,n)&&t.push(n);return t}},{key:"toString",value:function(e,t){return e?e.toString():t}},{key:"toStringTag",value:function(e,t){return e?e[Symbol.toStringTag]:t}}]),e}(),y=function(){function e(){s()(this,e)}return c()(e,null,[{key:"compilePattern",value:function(e,t){if(e)try{return new RegExp(e,t)}catch(e){}}},{key:"escapePattern",value:function(e){var t=/[\\^$.*+?\-()[\]{}|]/g;return e&&t.test(e)?e.replace(t,"\\$&"):e}},{key:"extractWords",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;return e&&e.match(t)||void 0}},{key:"isCompilable",value:function(e,t){if(!e)return!1;try{return new RegExp(e,t),!0}catch(e){}return!1}},{key:"isAlphabetic",value:function(e){return!!e&&/^[A-Za-z]+$/.test(e)}},{key:"isAlphanumeric",value:function(e){return!!e&&/^[A-Za-z\d]+$/.test(e)}},{key:"isNumeric",value:function(e){return!!e&&/^\d+$/.test(e)}},{key:"testResetting",value:function(e,t){if(!e||!t)return!1;e.lastIndex=0;var n=e.test(t);return e.lastIndex=0,n}}]),e}(),h=function(){function e(){s()(this,e)}return c()(e,null,[{key:"allEmpty",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isEmpty(e)}))}},{key:"allNotEmpty",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotEmpty(e)}))}},{key:"allBlank",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isBlank(e)}))}},{key:"allNotBlank",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotBlank(e)}))}},{key:"anyEmpty",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isEmpty(e)}))}},{key:"anyNotEmpty",value:function(e){var t=this;return!!e&&(null==e?void 0:e.length)>0&&e.some((function(e){return t.isNotEmpty(e)}))}},{key:"anyBlank",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isBlank(e)}))}},{key:"anyNotBlank",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isNotBlank(e)}))}},{key:"abbreviate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return!e||t<0||t>=e.length?e:0===t?"":t<=n.length?n.substring(0,t):e.substring(0,t-n.length)+n}},{key:"appendIfMissing",value:function(e,t){return!e||this.isEmpty(t)||this.endsWith(e,t)?e:e+t}},{key:"appendIfMissingIgnoreCase",value:function(e,t){return!e||this.isEmpty(t)||this.endsWithIgnoreCase(e,t)?e:e+t}},{key:"capitalizeFirst",value:function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):e}},{key:"capitalizeFirstLowerTail",value:function(e){var t;return e?e.charAt(0).toUpperCase()+(null===(t=e.substring(1))||void 0===t?void 0:t.toLowerCase()):e}},{key:"center",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";if(!e||t<0||t>0&&t<=e.length)return e;if(0===t)return"";var r=Math.floor((t-e.length)/2);return e.padStart(e.length+r,null!=n?n:" ").padEnd(t,null!=n?n:" ")}},{key:"defaultString",value:function(e){return e||""}},{key:"defaultIfEmpty",value:function(e,t){return this.isEmpty(e)?t:e}},{key:"defaultIfBlank",value:function(e,t){return this.isBlank(e)?t:e}},{key:"endsWith",value:function(e,t){return e&&t?!(e.length<t.length)&&e.endsWith(t):e===t}},{key:"endsWithIgnoreCase",value:function(e,t){return e&&t?!(e.length<t.length)&&e.toLowerCase().endsWith(t.toLowerCase()):e===t}},{key:"endsWithAny",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.endsWith(e,t)}))}},{key:"endsWithAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.endsWithIgnoreCase(e,t)}))}},{key:"equals",value:function(e,t){return e===t||!(!e||!t||(null==e?void 0:e.length)!==(null==t?void 0:t.length))&&e===t}},{key:"equalsIgnoreCase",value:function(e,t){return e===t||!(!e||!t||(null==e?void 0:e.length)!==(null==t?void 0:t.length))&&(null==e?void 0:e.toUpperCase())===(null==t?void 0:t.toUpperCase())}},{key:"equalsAny",value:function(e,t){return g.includes(t,e)}},{key:"equalsAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.equalsIgnoreCase(e,t)}))}},{key:"escapeHtml",value:function(e){if(!e)return e;var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,(function(e){return t[e]}))}},{key:"unescapeHtml",value:function(e){if(!e)return e;var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#039;":"'"};return e.replace(/(&amp;)|(&lt;)|(&gt;)|(&quot;)|(&#039;)/g,(function(e){return t[e]}))}},{key:"filterIgnoreEmpty",value:function(e){var t=this;if(e&&0!==e.length){var n=e.filter((function(e){return t.isNotEmpty(e)}));return n&&0!==n.length?n:void 0}}},{key:"filterIgnoreBlank",value:function(e){var t=this;if(e&&0!==e.length){var n=e.filter((function(e){return t.isNotBlank(e)}));return n&&0!==n.length?n:void 0}}},{key:"formatBrace",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!e||e.length<=2||!n||0===n.length)return e;for(var u=e,i=0,o=n;i<o.length;i++){var a=o[i];u=u.replace("{}",v.toString(a,""))}return u}},{key:"formatPercent",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!e||e.length<=2||!n||0===n.length)return e;var u=e.match(/%[bcdfjosxX]/g)||[],i=g.minLength(u,n);if(0===i)return e;for(var o=e,a=0;a<i;a++){var l=n[a],s=u[a].substring(1);switch(s){case"b":case"c":case"d":case"o":case"x":case"X":try{var f=void 0;"string"==typeof l?f=Number.parseInt(l):l instanceof String?f=Number.parseInt(l.toString()):"number"==typeof l&&(f=l),f&&("b"===s?o=o.replace("%".concat(s),f.toString(2)):"c"===s?o=o.replace("%".concat(s),String.fromCharCode(f)):"d"===s?o=o.replace("%".concat(s),f.toString(10)):"o"===s?o=o.replace("%".concat(s),"0"+f.toString(8)):"x"===s?o=o.replace("%".concat(s),"0x"+f.toString(16)):"X"===s&&(o=o.replace("%".concat(s),"0x"+f.toString(16).toUpperCase())))}catch(e){throw new TypeError("Invalid parameter type of '".concat(l,"', index ").concat(a))}break;case"f":try{var c=void 0;"string"==typeof l?c=Number.parseFloat(l):l instanceof String?c=Number.parseFloat(l.toString()):"number"==typeof l&&(c=l),c&&(o=o.replace("%".concat(s),"0x"+c.toString()))}catch(e){throw new TypeError("Invalid parameter type of '".concat(l,"', index ").concat(a))}break;case"j":if(null==l){o=o.replace("%".concat(s),"");break}if(v.isPlain(l)){o=o.replace("%".concat(s),JSON.stringify(l));break}throw new TypeError("Invalid parameter type of '".concat(l,"', index ").concat(a));case"s":o=o.replace("%".concat(s),v.toString(l,""))}}return o}},{key:"formatPlaceholder",value:function(e,t){if(!e||e.length<=2||!t)return e;var n=e;for(var r in t){var u=new RegExp("\\{".concat(r,"\\}"),"g"),i=t[r];n=n.replace(u,i?i.toString():"")}return n}},{key:"fromChars",value:function(e){return e?e.join(""):void 0}},{key:"getLength",value:function(e){return e?e.length:0}},{key:"isEmpty",value:function(e){return!e||0===e.length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isBlank",value:function(e){return!e||0===(null==e?void 0:e.length)||/^\s*$/.test(e)}},{key:"isNotBlank",value:function(e){return!this.isBlank(e)}},{key:"includes",value:function(e,t){return e===t||!!e&&!!t&&e.includes(t)}},{key:"includesIgnoreCase",value:function(e,t){var n;return e===t||!!e&&!!t&&(null==e||null===(n=e.toUpperCase())||void 0===n?void 0:n.includes(null==t?void 0:t.toUpperCase()))}},{key:"includesAny",value:function(e,t){var n=this;return!(!e||!t)&&(null==t?void 0:t.some((function(t){return n.includes(e,t)})))}},{key:"includesAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&(null==t?void 0:t.some((function(t){return n.includesIgnoreCase(e,t)})))}},{key:"joinWith",value:function(e,t,n){if(e&&(!Array.isArray(e)||0!==e.length)){if(Array.isArray(e)){if(!n)return e.join(this.defaultString(t));var r=e.filter(n);return r&&0!==r.length?r.join(this.defaultString(t)):void 0}return n?n(e)?e:void 0:e}}},{key:"left",value:function(e,t){return!e||void 0===t||t<0?e:0===t?"":e.substring(0,t)}},{key:"right",value:function(e,t){return!e||void 0===t||t<0?e:0===t?"":e.length<=t?e:e.substring(e.length-t)}},{key:"prependIfMissing",value:function(e,t){return!e||this.isEmpty(t)||this.startsWith(e,t)?e:t+e}},{key:"prependIfMissingIgnoreCase",value:function(e,t){return!e||this.isEmpty(t)||this.startsWithIgnoreCase(e,t)?e:t+e}},{key:"quoteSingle",value:function(e){return e?"'".concat(e,"'"):e}},{key:"quoteDouble",value:function(e){return e?'"'.concat(e,'"'):e}},{key:"unquote",value:function(e){return e?e.replace(/^['"`]|['"`]$/g,""):e}},{key:"removeAll",value:function(e,t){return this.replaceAll(e,t,"")}},{key:"removeAllIgnoreCase",value:function(e,t){return this.replaceAllIgnoreCase(e,t,"")}},{key:"removeFirst",value:function(e,t){return this.replaceFirst(e,t,"")}},{key:"removeFirstIgnoreCase",value:function(e,t){return this.replaceFirstIgnoreCase(e,t,"")}},{key:"removeEquals",value:function(e,t){return g.removeAll(e,t)}},{key:"removeEqualsIgnoreCase",value:function(e,t){var n=this;return e&&0!==e.length&&t&&0!==t.length?e.filter((function(e){return!t.some((function(t){return n.equalsIgnoreCase(e,t)}))})):e}},{key:"removeIncludes",value:function(e,t){var n=this;return e&&0!==e.length&&t&&0!==t.length?e.filter((function(e){return!t.some((function(t){return n.includes(e,t)}))})):e}},{key:"removeIncludesIgnoreCase",value:function(e,t){var n=this;return e&&0!==e.length&&t&&0!==t.length?e.filter((function(e){return!t.some((function(t){return n.includesIgnoreCase(e,t)}))})):e}},{key:"removeStart",value:function(e,t){return e&&t&&this.startsWith(e,t)?e.substring(t.length):e}},{key:"removeStartIgnoreCase",value:function(e,t){return e&&t&&this.startsWithIgnoreCase(e,t)?e.substring(t.length):e}},{key:"removeEnd",value:function(e,t){return e&&t&&this.endsWith(e,t)?e.substring(0,e.length-t.length):e}},{key:"removeEndIgnoreCase",value:function(e,t){return e&&t&&this.endsWithIgnoreCase(e,t)?e.substring(0,e.length-t.length):e}},{key:"replaceAll",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(new RegExp(t,"g"),null!=n?n:"")}},{key:"replaceAllIgnoreCase",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(new RegExp(t,"gi"),null!=n?n:"")}},{key:"replaceFirst",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(t,null!=n?n:"")}},{key:"replaceFirstIgnoreCase",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(new RegExp(t,"i"),null!=n?n:"")}},{key:"reverse",value:function(e,t,n){if(!e)return e;var r=e.substring(null!=t?t:0,n);return this.toChars(r).reverse().join("")}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e){var u=e.split(t,n);if(u&&0!==u.length)return r?u.map((function(e){return e?e.trim():e})):u}}},{key:"startsWith",value:function(e,t){return e&&t?!(e.length<t.length)&&e.startsWith(t):e===t}},{key:"startsWithIgnoreCase",value:function(e,t){return e&&t?!(e.length<t.length)&&e.toLowerCase().startsWith(t.toLowerCase()):e===t}},{key:"startsWithAny",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.startsWith(e,t)}))}},{key:"startsWithAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.startsWithIgnoreCase(e,t)}))}},{key:"substringAfter",value:function(e,t){if(e&&t&&0!==t.length){var n=e.indexOf(t);return-1===n?void 0:e.substring(n+t.length)}}},{key:"substringAfterLast",value:function(e,t){if(e&&t&&0!==t.length){var n=e.lastIndexOf(t);return-1===n?void 0:e.substring(n+t.length)}}},{key:"substringBefore",value:function(e,t){if(e&&t&&0!==t.length){var n=e.indexOf(t);return-1===n?void 0:e.substring(0,n)}}},{key:"substringBeforeLast",value:function(e,t){if(e&&t&&0!==t.length){var n=e.lastIndexOf(t);return-1===n?void 0:e.substring(0,n)}}},{key:"toChars",value:function(e){return e?e.split(""):void 0}},{key:"toCamelCase",value:function(e,t){var n=this;if(!e||0===e.length)return e;var r=y.extractWords(e,t);return r?r.reduce((function(e,t,r){return t=t.toLowerCase(),e+(r>0?n.capitalizeFirst(t):t)}),""):void 0}},{key:"toKebabCase",value:function(e,t){if(!e||0===e.length)return e;var n=y.extractWords(e,t);return n?n.reduce((function(e,t,n){return e+(n>0?"-":"")+t.toLowerCase()}),""):void 0}},{key:"trim",value:function(e,t){if(!e)return e;var n=e.trim();return t&&this.isEmpty(n)?null:n}}]),e}(),g=function(){function e(){s()(this,e)}return c()(e,null,[{key:"add",value:function(e,t){if(!e)return t?[t]:void 0;if(!t)return e;var n=a()(e);return n[n.length]=t,n}},{key:"addAll",value:function(e,t){return e?t?[].concat(a()(e),a()(t)):e:t}},{key:"count",value:function(e,t){return e?t?e.filter(t).length:e.length:0}},{key:"firstNotNil",value:function(e){return this.isEmpty(e)?void 0:e.find((function(e){return v.isNotNil(e)}))}},{key:"firstNotEmpty",value:function(e){return this.isEmpty(e)?void 0:e.find((function(e){return v.isNotEmpty(e)}))}},{key:"getFirst",value:function(e){return e&&0!==e.length?e[0]:void 0}},{key:"getLast",value:function(e){return e&&0!==e.length?e[e.length-1]:void 0}},{key:"getLength",value:function(e){return e?e.length:0}},{key:"getTypeof",value:function(e){if(!this.isEmpty(e))return null==e?void 0:e.map((function(e){return Array.isArray(e)?"array":"object"===i()(e)?null===e?"null":"object":i()(e)}))}},{key:"isEmpty",value:function(e){return!e||0===e.length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isTypeof",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!this.isEmpty(e)&&!h.isBlank(t)&&(null==e?void 0:e.every((function(e){return i()(e)===t||n&&null===e&&h.equalsAny(t,["string","object"])})))}},{key:"includes",value:function(e,t){return!!e&&!!t&&e.includes(t)}},{key:"includesAll",value:function(e,t){return!!e&&!!t&&t.every((function(t){return e.includes(t)}))}},{key:"includesAny",value:function(e,t){return!!e&&!!t&&t.some((function(t){return e.includes(t)}))}},{key:"insert",value:function(e,t,n){if(void 0===t||!n||0===n.length)return e;if(!e||0===e.length)return n;if(t<0||t>=e.length)return e.concat(n);if(0===t)return n.concat(e);var r=Math.min(t,e.length);return e.slice(0,r).concat(n).concat(e.slice(r))}},{key:"maxLength",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.isEmpty(t))return 0;for(var r=0,u=0,i=t;u<i.length;u++){var o=i[u];r=Math.max(r,this.getLength(o))}return r}},{key:"minLength",value:function(){for(var e,n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];if(this.isEmpty(r))return 0;var i,o=null===(e=r[0])||void 0===e?void 0:e.length,a=t()(r.slice(1));try{for(a.s();!(i=a.n()).done;){var l=i.value;if(0===(o=Math.min(o,this.getLength(l))))break}}catch(e){a.e(e)}finally{a.f()}return o}},{key:"readonly",value:function(e){return e?Object.freeze(e):e}},{key:"remove",value:function(e,t){return e&&t?e.filter((function(e){return e!==t})):e}},{key:"removeAll",value:function(e,t){return e&&t?e.filter((function(e){return!t.includes(e)})):e}},{key:"reverse",value:function(e,t,n){if(!e)return e;var r=e.slice(t,n);return r.reverse(),r}},{key:"singleton",value:function(e){return e?[e]:void 0}}]),e}(),p=function(){function e(){s()(this,e)}return c()(e,null,[{key:"allTrue",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isTrue(e)}))}},{key:"allNotTrue",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isNotTrue(e)}))}},{key:"allFalse",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isFalse(e)}))}},{key:"allNotFalse",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isNotFalse(e)}))}},{key:"anyTrue",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isTrue(e)}))}},{key:"anyNotTrue",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isNotTrue(e)}))}},{key:"anyFalse",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isFalse(e)}))}},{key:"anyNotFalse",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isNotFalse(e)}))}},{key:"isTrue",value:function(e){return"boolean"==typeof e?e:"number"==typeof e?e>0:"string"==typeof e?h.equalsAnyIgnoreCase(e,["true","yes","on","y","t","1"]):"function"==typeof e&&e()}},{key:"isNotTrue",value:function(e){return null==e||!this.isTrue(e)}},{key:"isFalse",value:function(e){return"boolean"==typeof e?!e:"number"==typeof e?e<=0:"string"==typeof e?h.equalsAnyIgnoreCase(e,["false","no","off","n","f","0"]):"function"==typeof e&&!e()}},{key:"isNotFalse",value:function(e){return null==e||!this.isFalse(e)}},{key:"toString",value:function(e,t,n,r){return v.isNil(e)?r:e?t:n}},{key:"toStringTrueFalse",value:function(e){return this.toString(e,"true","false",void 0)}},{key:"toStringOnOff",value:function(e){return this.toString(e,"on","off",void 0)}},{key:"toStringYesNo",value:function(e){return this.toString(e,"yes","no",void 0)}},{key:"toStringYN",value:function(e){return this.toString(e,"Y","N",void 0)}},{key:"toStringTF",value:function(e){return this.toString(e,"T","F",void 0)}},{key:"toString10",value:function(e){return this.toString(e,"1","0",void 0)}}]),e}(),d=function(){function e(){s()(this,e)}return c()(e,null,[{key:"addYear",value:function(e,t){if(!e||!t)return e;var n=new Date(e);return n.setFullYear(e.getFullYear()+t),n}},{key:"addMonth",value:function(e,t){if(!e||!t)return e;var n=new Date(e);return n.setMonth(e.getMonth()+t),n}},{key:"addDay",value:function(e,t){if(!e||!t)return e;var n=new Date(e);return n.setDate(e.getDate()+t),n}},{key:"formatDateTime",value:function(e,t){if(e&&t){var n={"y+":e.getFullYear(),"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours()%12==0?12:e.getHours()%12,"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()},r=t;for(var u in n){var i=new RegExp("(".concat(u,")")).exec(r);i&&(r=/(y+)/.test(u)?r.replace(i[1],n[u].toString().substring(4-i[1].length)):r.replace(i[1],1===i[1].length?n[u].toString():n[u].toString().padStart(i[1].length,"0")))}return r}}},{key:"getCurrentDate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return this.formatDateTime(new Date,e)}},{key:"getCurrentDateTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd hh:mm:ss";return this.formatDateTime(new Date,e)}},{key:"getCurrentTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hh:mm:ss";return this.formatDateTime(new Date,e)}},{key:"getStartOfYear",value:function(e){if(e){var t=new Date(e);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}}},{key:"getStartOfMonth",value:function(e){if(e){var t=new Date(e);return t.setDate(1),t.setHours(0,0,0,0),t}}},{key:"getStartOfDay",value:function(e){if(e){var t=new Date(e);return t.setHours(0,0,0,0),t}}},{key:"getEndOfYear",value:function(e){if(e){var t=new Date(e);return t.setFullYear(e.getFullYear()+1,0,0),t.setHours(23,59,59,999),t}}},{key:"getEndOfMonth",value:function(e){if(e){var t=new Date(e);return t.setFullYear(e.getFullYear(),e.getMonth()+1,0),t.setHours(23,59,59,999),t}}},{key:"getEndOfDay",value:function(e){if(e){var t=new Date(e);return t.setHours(23,59,59,999),t}}},{key:"getTimezone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getTimezoneOffset(),n=Math.abs(t),r=Math.floor(n/60),u=n%60,i=u>0?":"+("0"+u).slice(-2):"";return(t<0?"+":"-")+r+i}},{key:"isFirstDayOfMonth",value:function(e){return!!e&&1===e.getDate()}},{key:"isLastDayOfMonth",value:function(e){return!!e&&this.isSameDay(this.getEndOfDay(e),this.getEndOfMonth(e))}},{key:"isLeapYear",value:function(e){if(void 0===e)return!1;var t=e instanceof Date?e.getFullYear():e;return!((t%4||!(t%100))&&t%400)}},{key:"isSameYear",value:function(e,t){return!!e&&!!t&&e.getFullYear()===t.getFullYear()}},{key:"isSameMonth",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return!(!e||!t||e.getMonth()!==t.getMonth()||n&&e.getFullYear()!==t.getFullYear())}},{key:"isSameDay",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return!!e&&!!t&&e.getDate()===t.getDate()&&(!n||e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}},{key:"isWeekend",value:function(e){return!!e&&(0===e.getDay()||6===e.getDay())}},{key:"isYesterday",value:function(e){return!!e&&this.isSameDay(new Date,this.addDay(e,1))}},{key:"isTomorrow",value:function(e){return!!e&&this.isSameDay(new Date,this.addDay(e,-1))}}]),e}(),k=function(){function e(){s()(this,e)}return c()(e,null,[{key:"isJsonString",value:function(e){if(h.isBlank(e))return!1;try{if("string"==typeof e&&"object"===i()(JSON.parse(e)))return!0}catch(e){}return!1}},{key:"toJsonString",value:function(e){if("string"==typeof e&&e.length>0)try{var t=JSON.parse(e);if("object"===i()(t))return JSON.stringify(t)}catch(e){}if(v.isPlain(e))return JSON.stringify(e)}}]),e}(),m=n(925),b=n.n(m),x=function(){function e(){s()(this,e)}return c()(e,null,[{key:"forEach",value:function(e,n){if(e&&0!==e.size&&n){var r,u=t()(e.entries());try{for(u.s();!(r=u.n()).done;){var i=b()(r.value,2),o=i[0];n(i[1],o)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"forEachBreakable",value:function(e,n){if(e&&0!==e.size&&n){var r,u=t()(e.entries());try{for(u.s();!(r=u.n()).done;){var i=b()(r.value,2),o=i[0];if(!n(i[1],o))break}}catch(e){u.e(e)}finally{u.f()}}}},{key:"forEachIndexing",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0];n(o[1],a,u++)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"forEachIndexingBreakable",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0];if(!n(o[1],a,u++))break}}catch(e){i.e(e)}finally{i.f()}}}},{key:"forEachIndexingTailing",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0],l=o[1];if(!(u<e.size-1))return[a,l];n(l,a,u++)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"forEachTailing",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0],l=o[1];if(!(u<e.size-1))return[a,l];n(l,a),u++}}catch(e){i.e(e)}finally{i.f()}}}}]),e}(),E=function(){function e(){s()(this,e)}return c()(e,null,[{key:"isInteger",value:function(e){return!!e&&Math.floor(e)===Math.ceil(e)}},{key:"isPositive",value:function(e){return void 0!==e&&e>0}},{key:"isNotPositive",value:function(e){return!this.isPositive(e)}},{key:"isNegative",value:function(e){return void 0!==e&&e<0}},{key:"isNotNegative",value:function(e){return!this.isNegative(e)}},{key:"toInteger",value:function(e){if(e)try{var t=Number.parseInt(e);return Number.isNaN(t)?void 0:t}catch(e){}}},{key:"toFloat",value:function(e){if(e)try{var t=Number.parseFloat(e);return Number.isNaN(t)?void 0:t}catch(e){}}},{key:"max",value:function(e){if(e&&0!==e.length){for(var t=e[0],n=1;n<e.length;n++)t<e[n]&&(t=e[n]);return t}}},{key:"min",value:function(e){if(e&&0!==e.length){for(var t=e[0],n=1;n<e.length;n++)t>e[n]&&(t=e[n]);return t}}},{key:"sum",value:function(e){return e?e.reduce((function(e,t){return e+t})):void 0}},{key:"average",value:function(e){return e?this.sum(e)/e.length:void 0}}]),e}(),N=function(){function e(){s()(this,e)}return c()(e,null,[{key:"randomBoolean",value:function(){return Math.random()>=.5}},{key:"randomElement",value:function(e){return e&&0!==e.length?e.at(this.randomInteger(0,e.length)):void 0}},{key:"randomElements",value:function(e,t){if(!(!e||0===e.length||!t||t<=0||t>Number.MAX_SAFE_INTEGER)){if(e.length<=t)return e;for(var n=new Set;n.size<t;)n.add(this.randomInteger(0,e.length));return e.filter((function(e,t){return n.has(t)}))}}},{key:"randomInteger",value:function(e,t){var n=this.randomNumber(e,t);return n?Math.floor(n):void 0}},{key:"randomIntegers",value:function(e,t,n){if(!(!e||e<=0||e>Number.MAX_SAFE_INTEGER)){for(var r=[],u=0;u<e;u++){var i=this.randomInteger(t,n);if(!i)break;r.push(i)}return r}}},{key:"randomNumber",value:function(e,t){var n=void 0!==e?e:Number.MIN_SAFE_INTEGER,r=void 0!==t?t:Number.MAX_SAFE_INTEGER;return n>r?void 0:n+(r-n)*Math.random()}},{key:"randomNumbers",value:function(e,t,n){if(!(!e||e<=0||e>Number.MAX_SAFE_INTEGER)){for(var r=[],u=0;u<e;u++){var i=this.randomNumber(t,n);if(!i)break;r.push(i)}return r}}},{key:"randomString",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(!(!e||e<=0||t&&t<e||0===n.length)){if(void 0===t&&1===n.length)return n.repeat(e);for(var r=[],u=void 0===t?e:this.randomInteger(e,t),i=h.toChars(n),o=0;o<u;o++)r.push(this.randomElement(i));return h.fromChars(r)}}},{key:"randomStrings",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(!(!e||e<=0||e>Number.MAX_SAFE_INTEGER||!t||t<=0)){for(var u=[],i=0;i<e;i++){var o=this.randomString(t,n,r);if(!o)break;u.push(o)}return u}}}]),e}(),S=function(){function e(){s()(this,e)}return c()(e,null,[{key:"sleep",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;return new Promise((function(t){setTimeout(t,e)}))}}]),e}(),I=function(){function e(){s()(this,e)}return c()(e,null,[{key:"forEach",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";if(e&&0!==e.length&&n&&r){var u,i=t()(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;n(o,e);var a=v.getProp(o,r);a&&Array.isArray(a)&&this.forEach(a,n,r)}}catch(e){i.e(e)}finally{i.f()}}}}]),e}()}(),r}()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TsLangUtils=t():e.TsLangUtils=t()}(self,(function(){return function(){var e={317:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},180:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},786:function(e,t,n){var r=n(317);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},486:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},702:function(e,t,n){var r=n(281);function u(e,t){for(var n=0;n<t.length;n++){var u=t[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(e,r(u.key),u)}}e.exports=function(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},746:function(e,t,n){var r=n(508);e.exports=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var u=0,i=function(){};return{s:i,n:function(){return u>=e.length?{done:!0}:{done:!1,value:e[u++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}},e.exports.__esModule=!0,e.exports.default=e.exports},682:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},249:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,i,o,a=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){s=!0,u=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw u}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},20:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},114:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},925:function(e,t,n){var r=n(180),u=n(249),i=n(508),o=n(20);e.exports=function(e,t){return r(e)||u(e,t)||i(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},44:function(e,t,n){var r=n(786),u=n(682),i=n(508),o=n(114);e.exports=function(e){return r(e)||u(e)||i(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},224:function(e,t,n){var r=n(944).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var u=n.call(e,t||"default");if("object"!=r(u))return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},281:function(e,t,n){var r=n(944).default,u=n(224);e.exports=function(e){var t=u(e,"string");return"symbol"==r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},944:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},508:function(e,t,n){var r=n(317);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var u=t[r];if(void 0!==u)return u.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{ArrayUtils:function(){return g},BooleanUtils:function(){return p},DateUtils:function(){return d},IgnorableError:function(){},JsonUtils:function(){return k},MapUtils:function(){return x},NumberUtils:function(){return E},ObjectUtils:function(){return v},RandomUtils:function(){return N},RegexUtils:function(){return y},StringUtils:function(){return h},ThreadUtils:function(){return S},TreeUtils:function(){return I},UnsupportedError:function(){}});var e=n(746),t=n.n(e),u=n(944),i=n.n(u),o=n(44),a=n.n(o),l=n(486),s=n.n(l),f=n(702),c=n.n(f),v=function(){function e(){s()(this,e)}return c()(e,null,[{key:"allNil",value:function(e){var t=this;return!e||0===e.length||(null==e?void 0:e.every((function(e){return t.isNil(e)})))}},{key:"allNotNil",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotNil(e)}))}},{key:"anyNil",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isNil(e)}))}},{key:"anyNotNil",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isNotNil(e)}))}},{key:"allEmpty",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isEmpty(e)}))}},{key:"allNotEmpty",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotEmpty(e)}))}},{key:"anyEmpty",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isEmpty(e)}))}},{key:"anyNotEmpty",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isNotEmpty(e)}))}},{key:"clone",value:function(e){return e&&this.isPlain(e)?Object.assign({},e):void 0}},{key:"cloneExclusive",value:function(e,t){var n=this;if(e&&this.isPlain(e)){if(!t||0===t.length)return this.clone(e);var r={};return Object.entries(e).filter((function(e){return!t.includes(e[0])})).forEach((function(e){return n.setProp(r,e[0],e[1])})),r}}},{key:"cloneInclusive",value:function(e,t){var n=this;if(e&&this.isPlain(e)&&t&&0!==t.length){var r={};return Object.entries(e).filter((function(e){return t.includes(e[0])})).forEach((function(e){return n.setProp(r,e[0],e[1])})),r}}},{key:"defaultProps",value:function(e,t){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!this.isPlain(e))return t;if(!t||!this.isPlain(t))return e;var u={};return Object.entries(t).filter((function(t){return!Object.prototype.hasOwnProperty.call(e,t[0])||r&&(void 0===e[t[0]]||null===e[t[0]])})).forEach((function(e){return n.setProp(u,e[0],e[1])})),Object.assign(e,u)}},{key:"forEachProp",value:function(e,t){e&&this.isPlain(e)&&t&&Object.keys(e).filter((function(t){return Object.prototype.hasOwnProperty.call(e,t)})).forEach((function(e,n){t(e,n)}))}},{key:"mapEachProp",value:function(e,t){if(e&&this.isPlain(e)&&t)return Object.keys(e).filter((function(t){return Object.prototype.hasOwnProperty.call(e,t)})).map((function(e,n){return t(e,n)}))}},{key:"isNil",value:function(e){return null==e}},{key:"isNotNil",value:function(e){return!this.isNil(e)}},{key:"isNull",value:function(e){return null===e}},{key:"isNotNull",value:function(e){return!this.isNull(e)}},{key:"isUndefined",value:function(e){return void 0===e}},{key:"isNotUndefined",value:function(e){return!this.isUndefined(e)}},{key:"isEmpty",value:function(e){return!e||("string"==typeof e||Array.isArray(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"===i()(e)&&0===(null===(t=this.keys(e))||void 0===t?void 0:t.length));var t}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isPlain",value:function(e){return"object"===i()(e)&&"[object Object]"===Object.prototype.toString.call(e)}},{key:"isPrimitive",value:function(e){return null==e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||"symbol"===i()(e)||"bigint"==typeof e||"function"==typeof e}},{key:"isPromise",value:function(e){return"object"===i()(e)&&"[object Promise]"===Object.prototype.toString.call(e)}},{key:"isPrototype",value:function(e){if("object"!==i()(e))return!1;var t=e.constructor;return e===("function"==typeof t?t.prototype:e.prototype)}},{key:"isRegular",value:function(e){return e instanceof RegExp||"object"===i()(e)&&"[object RegExp]"===Object.prototype.toString.call(e)}},{key:"getProp",value:function(e,t){if("object"===i()(e)&&t&&0!==t.length){if(!t.includes("."))return e[t];var n=t.replace(/\[/g,".").replace(/]/g,"").split(".");if(n&&0!==n.length)return 1===n.length?e[n[0]]:n.reduce((function(e,t){return(e||{})[t]}),e)}}},{key:"hasProp",value:function(e,t){return"object"===i()(e)&&!!t&&t.length>0&&Object.prototype.hasOwnProperty.call(e,t)}},{key:"setProp",value:function(e,t,n){this.isPlain(e)&&t&&(e[t]=n)}},{key:"keys",value:function(e){if(!e)return[];if(!this.isPrototype(e))return Object.keys(e);var t=[];for(var n in Object(e))"constructor"!==n&&this.hasProp(e,n)&&t.push(n);return t}},{key:"toString",value:function(e,t){return e?e.toString():t}},{key:"toStringTag",value:function(e,t){return e?e[Symbol.toStringTag]:t}}]),e}(),y=function(){function e(){s()(this,e)}return c()(e,null,[{key:"compilePattern",value:function(e,t){if(e)try{return new RegExp(e,t)}catch(e){}}},{key:"escapePattern",value:function(e){var t=/[\\^$.*+?\-()[\]{}|]/g;return e&&t.test(e)?e.replace(t,"\\$&"):e}},{key:"extractWords",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;return e&&e.match(t)||void 0}},{key:"isCompilable",value:function(e,t){if(!e)return!1;try{return new RegExp(e,t),!0}catch(e){}return!1}},{key:"isAlphabetic",value:function(e){return!!e&&/^[A-Za-z]+$/.test(e)}},{key:"isAlphanumeric",value:function(e){return!!e&&/^[A-Za-z\d]+$/.test(e)}},{key:"isNumeric",value:function(e){return!!e&&/^\d+$/.test(e)}},{key:"testResetting",value:function(e,t){if(!e||!t)return!1;e.lastIndex=0;var n=e.test(t);return e.lastIndex=0,n}}]),e}(),h=function(){function e(){s()(this,e)}return c()(e,null,[{key:"allEmpty",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isEmpty(e)}))}},{key:"allNotEmpty",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotEmpty(e)}))}},{key:"allBlank",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isBlank(e)}))}},{key:"allNotBlank",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isNotBlank(e)}))}},{key:"anyEmpty",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isEmpty(e)}))}},{key:"anyNotEmpty",value:function(e){var t=this;return!!e&&(null==e?void 0:e.length)>0&&e.some((function(e){return t.isNotEmpty(e)}))}},{key:"anyBlank",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isBlank(e)}))}},{key:"anyNotBlank",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isNotBlank(e)}))}},{key:"abbreviate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return!e||t<0||t>=e.length?e:0===t?"":t<=n.length?n.substring(0,t):e.substring(0,t-n.length)+n}},{key:"appendIfMissing",value:function(e,t){return!e||this.isEmpty(t)||this.endsWith(e,t)?e:e+t}},{key:"appendIfMissingIgnoreCase",value:function(e,t){return!e||this.isEmpty(t)||this.endsWithIgnoreCase(e,t)?e:e+t}},{key:"capitalizeFirst",value:function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):e}},{key:"capitalizeFirstLowerTail",value:function(e){var t;return e?e.charAt(0).toUpperCase()+(null===(t=e.substring(1))||void 0===t?void 0:t.toLowerCase()):e}},{key:"center",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";if(!e||t<0||t>0&&t<=e.length)return e;if(0===t)return"";var r=Math.floor((t-e.length)/2);return e.padStart(e.length+r,null!=n?n:" ").padEnd(t,null!=n?n:" ")}},{key:"defaultString",value:function(e){return e||""}},{key:"defaultIfEmpty",value:function(e,t){return this.isEmpty(e)?t:e}},{key:"defaultIfBlank",value:function(e,t){return this.isBlank(e)?t:e}},{key:"endsWith",value:function(e,t){return e&&t?!(e.length<t.length)&&e.endsWith(t):e===t}},{key:"endsWithIgnoreCase",value:function(e,t){return e&&t?!(e.length<t.length)&&e.toLowerCase().endsWith(t.toLowerCase()):e===t}},{key:"endsWithAny",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.endsWith(e,t)}))}},{key:"endsWithAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.endsWithIgnoreCase(e,t)}))}},{key:"equals",value:function(e,t){return e===t||!(!e||!t||(null==e?void 0:e.length)!==(null==t?void 0:t.length))&&e===t}},{key:"equalsIgnoreCase",value:function(e,t){return e===t||!(!e||!t||(null==e?void 0:e.length)!==(null==t?void 0:t.length))&&(null==e?void 0:e.toUpperCase())===(null==t?void 0:t.toUpperCase())}},{key:"equalsAny",value:function(e,t){return g.includes(t,e)}},{key:"equalsAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.equalsIgnoreCase(e,t)}))}},{key:"escapeHtml",value:function(e){if(!e)return e;var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,(function(e){return t[e]}))}},{key:"unescapeHtml",value:function(e){if(!e)return e;var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#039;":"'"};return e.replace(/(&amp;)|(&lt;)|(&gt;)|(&quot;)|(&#039;)/g,(function(e){return t[e]}))}},{key:"filterIgnoreEmpty",value:function(e){var t=this;if(e&&0!==e.length){var n=e.filter((function(e){return t.isNotEmpty(e)}));return n&&0!==n.length?n:void 0}}},{key:"filterIgnoreBlank",value:function(e){var t=this;if(e&&0!==e.length){var n=e.filter((function(e){return t.isNotBlank(e)}));return n&&0!==n.length?n:void 0}}},{key:"formatBrace",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!e||e.length<=2||!n||0===n.length)return e;for(var u=e,i=0,o=n;i<o.length;i++){var a=o[i];u=u.replace("{}",v.toString(a,""))}return u}},{key:"formatPercent",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!e||e.length<=2||!n||0===n.length)return e;var u=e.match(/%[bcdfjosxX]/g)||[],i=g.minLength(u,n);if(0===i)return e;for(var o=e,a=0;a<i;a++){var l=n[a],s=u[a].substring(1);switch(s){case"b":case"c":case"d":case"o":case"x":case"X":try{var f=void 0;"string"==typeof l?f=Number.parseInt(l):l instanceof String?f=Number.parseInt(l.toString()):"number"==typeof l&&(f=l),f&&("b"===s?o=o.replace("%".concat(s),f.toString(2)):"c"===s?o=o.replace("%".concat(s),String.fromCharCode(f)):"d"===s?o=o.replace("%".concat(s),f.toString(10)):"o"===s?o=o.replace("%".concat(s),"0"+f.toString(8)):"x"===s?o=o.replace("%".concat(s),"0x"+f.toString(16)):"X"===s&&(o=o.replace("%".concat(s),"0x"+f.toString(16).toUpperCase())))}catch(e){throw new TypeError("Invalid parameter type of '".concat(l,"', index ").concat(a))}break;case"f":try{var c=void 0;"string"==typeof l?c=Number.parseFloat(l):l instanceof String?c=Number.parseFloat(l.toString()):"number"==typeof l&&(c=l),c&&(o=o.replace("%".concat(s),"0x"+c.toString()))}catch(e){throw new TypeError("Invalid parameter type of '".concat(l,"', index ").concat(a))}break;case"j":if(null==l){o=o.replace("%".concat(s),"");break}if(v.isPlain(l)){o=o.replace("%".concat(s),JSON.stringify(l));break}throw new TypeError("Invalid parameter type of '".concat(l,"', index ").concat(a));case"s":o=o.replace("%".concat(s),v.toString(l,""))}}return o}},{key:"formatPlaceholder",value:function(e,t){if(!e||e.length<=2||!t)return e;var n=e;for(var r in t){var u=new RegExp("\\{".concat(r,"\\}"),"g"),i=t[r];n=n.replace(u,i?i.toString():"")}return n}},{key:"fromChars",value:function(e){return e?e.join(""):void 0}},{key:"getLength",value:function(e){return e?e.length:0}},{key:"isEmpty",value:function(e){return!e||0===e.length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isBlank",value:function(e){return!e||0===(null==e?void 0:e.length)||/^\s*$/.test(e)}},{key:"isNotBlank",value:function(e){return!this.isBlank(e)}},{key:"includes",value:function(e,t){return e===t||!!e&&!!t&&e.includes(t)}},{key:"includesIgnoreCase",value:function(e,t){var n;return e===t||!!e&&!!t&&(null==e||null===(n=e.toUpperCase())||void 0===n?void 0:n.includes(null==t?void 0:t.toUpperCase()))}},{key:"includesAny",value:function(e,t){var n=this;return!(!e||!t)&&(null==t?void 0:t.some((function(t){return n.includes(e,t)})))}},{key:"includesAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&(null==t?void 0:t.some((function(t){return n.includesIgnoreCase(e,t)})))}},{key:"joinWith",value:function(e,t,n){if(e&&(!Array.isArray(e)||0!==e.length)){if(Array.isArray(e)){if(!n)return e.join(this.defaultString(t));var r=e.filter(n);return r&&0!==r.length?r.join(this.defaultString(t)):void 0}return n?n(e)?e:void 0:e}}},{key:"left",value:function(e,t){return!e||void 0===t||t<0?e:0===t?"":e.substring(0,t)}},{key:"right",value:function(e,t){return!e||void 0===t||t<0?e:0===t?"":e.length<=t?e:e.substring(e.length-t)}},{key:"prependIfMissing",value:function(e,t){return!e||this.isEmpty(t)||this.startsWith(e,t)?e:t+e}},{key:"prependIfMissingIgnoreCase",value:function(e,t){return!e||this.isEmpty(t)||this.startsWithIgnoreCase(e,t)?e:t+e}},{key:"quoteSingle",value:function(e){return e?"'".concat(e,"'"):e}},{key:"quoteDouble",value:function(e){return e?'"'.concat(e,'"'):e}},{key:"unquote",value:function(e){return e?e.replace(/^['"`]|['"`]$/g,""):e}},{key:"removeAll",value:function(e,t){return this.replaceAll(e,t,"")}},{key:"removeAllIgnoreCase",value:function(e,t){return this.replaceAllIgnoreCase(e,t,"")}},{key:"removeFirst",value:function(e,t){return this.replaceFirst(e,t,"")}},{key:"removeFirstIgnoreCase",value:function(e,t){return this.replaceFirstIgnoreCase(e,t,"")}},{key:"removeEquals",value:function(e,t){return g.removeAll(e,t)}},{key:"removeEqualsIgnoreCase",value:function(e,t){var n=this;return e&&0!==e.length&&t&&0!==t.length?e.filter((function(e){return!t.some((function(t){return n.equalsIgnoreCase(e,t)}))})):e}},{key:"removeIncludes",value:function(e,t){var n=this;return e&&0!==e.length&&t&&0!==t.length?e.filter((function(e){return!t.some((function(t){return n.includes(e,t)}))})):e}},{key:"removeIncludesIgnoreCase",value:function(e,t){var n=this;return e&&0!==e.length&&t&&0!==t.length?e.filter((function(e){return!t.some((function(t){return n.includesIgnoreCase(e,t)}))})):e}},{key:"removeStart",value:function(e,t){return e&&t&&this.startsWith(e,t)?e.substring(t.length):e}},{key:"removeStartIgnoreCase",value:function(e,t){return e&&t&&this.startsWithIgnoreCase(e,t)?e.substring(t.length):e}},{key:"removeEnd",value:function(e,t){return e&&t&&this.endsWith(e,t)?e.substring(0,e.length-t.length):e}},{key:"removeEndIgnoreCase",value:function(e,t){return e&&t&&this.endsWithIgnoreCase(e,t)?e.substring(0,e.length-t.length):e}},{key:"replaceAll",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(new RegExp(t,"g"),null!=n?n:"")}},{key:"replaceAllIgnoreCase",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(new RegExp(t,"gi"),null!=n?n:"")}},{key:"replaceFirst",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(t,null!=n?n:"")}},{key:"replaceFirstIgnoreCase",value:function(e,t,n){return this.isEmpty(e)||!t?e:null==e?void 0:e.replace(new RegExp(t,"i"),null!=n?n:"")}},{key:"reverse",value:function(e,t,n){if(!e)return e;var r=e.substring(null!=t?t:0,n);return this.toChars(r).reverse().join("")}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e){var u=e.split(t,n);if(u&&0!==u.length)return r?u.map((function(e){return e?e.trim():e})):u}}},{key:"startsWith",value:function(e,t){return e&&t?!(e.length<t.length)&&e.startsWith(t):e===t}},{key:"startsWithIgnoreCase",value:function(e,t){return e&&t?!(e.length<t.length)&&e.toLowerCase().startsWith(t.toLowerCase()):e===t}},{key:"startsWithAny",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.startsWith(e,t)}))}},{key:"startsWithAnyIgnoreCase",value:function(e,t){var n=this;return!(!e||!t||0===t.length)&&t.some((function(t){return n.startsWithIgnoreCase(e,t)}))}},{key:"substringAfter",value:function(e,t){if(e&&t&&0!==t.length){var n=e.indexOf(t);return-1===n?void 0:e.substring(n+t.length)}}},{key:"substringAfterLast",value:function(e,t){if(e&&t&&0!==t.length){var n=e.lastIndexOf(t);return-1===n?void 0:e.substring(n+t.length)}}},{key:"substringBefore",value:function(e,t){if(e&&t&&0!==t.length){var n=e.indexOf(t);return-1===n?void 0:e.substring(0,n)}}},{key:"substringBeforeLast",value:function(e,t){if(e&&t&&0!==t.length){var n=e.lastIndexOf(t);return-1===n?void 0:e.substring(0,n)}}},{key:"toChars",value:function(e){return e?e.split(""):void 0}},{key:"toCamelCase",value:function(e,t){var n=this;if(!e||0===e.length)return e;var r=y.extractWords(e,t);return r?r.reduce((function(e,t,r){return t=t.toLowerCase(),e+(r>0?n.capitalizeFirst(t):t)}),""):void 0}},{key:"toKebabCase",value:function(e,t){if(!e||0===e.length)return e;var n=y.extractWords(e,t);return n?n.reduce((function(e,t,n){return e+(n>0?"-":"")+t.toLowerCase()}),""):void 0}},{key:"trim",value:function(e,t){if(!e)return e;var n=e.trim();return t&&this.isEmpty(n)?null:n}}]),e}(),g=function(){function e(){s()(this,e)}return c()(e,null,[{key:"add",value:function(e,t){if(!e)return t?[t]:void 0;if(!t)return e;var n=a()(e);return n[n.length]=t,n}},{key:"addAll",value:function(e,t){return e?t?[].concat(a()(e),a()(t)):e:t}},{key:"count",value:function(e,t){return e?t?e.filter(t).length:e.length:0}},{key:"firstNotNil",value:function(e){return this.isEmpty(e)?void 0:e.find((function(e){return v.isNotNil(e)}))}},{key:"firstNotEmpty",value:function(e){return this.isEmpty(e)?void 0:e.find((function(e){return v.isNotEmpty(e)}))}},{key:"getFirst",value:function(e){return e&&0!==e.length?e[0]:void 0}},{key:"getLast",value:function(e){return e&&0!==e.length?e[e.length-1]:void 0}},{key:"getLength",value:function(e){return e?e.length:0}},{key:"getTypeof",value:function(e){if(!this.isEmpty(e))return null==e?void 0:e.map((function(e){return Array.isArray(e)?"array":"object"===i()(e)?null===e?"null":"object":i()(e)}))}},{key:"isEmpty",value:function(e){return!e||0===e.length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isTypeof",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!this.isEmpty(e)&&!h.isBlank(t)&&(null==e?void 0:e.every((function(e){return i()(e)===t||n&&null===e&&h.equalsAny(t,["string","object"])})))}},{key:"includes",value:function(e,t){return!!e&&!!t&&e.includes(t)}},{key:"includesAll",value:function(e,t){return!!e&&!!t&&t.every((function(t){return e.includes(t)}))}},{key:"includesAny",value:function(e,t){return!!e&&!!t&&t.some((function(t){return e.includes(t)}))}},{key:"insert",value:function(e,t,n){if(void 0===t||!n||0===n.length)return e;if(!e||0===e.length)return n;if(t<0||t>=e.length)return e.concat(n);if(0===t)return n.concat(e);var r=Math.min(t,e.length);return e.slice(0,r).concat(n).concat(e.slice(r))}},{key:"maxLength",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.isEmpty(t))return 0;for(var r=0,u=0,i=t;u<i.length;u++){var o=i[u];r=Math.max(r,this.getLength(o))}return r}},{key:"minLength",value:function(){for(var e,n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];if(this.isEmpty(r))return 0;var i,o=null===(e=r[0])||void 0===e?void 0:e.length,a=t()(r.slice(1));try{for(a.s();!(i=a.n()).done;){var l=i.value;if(0===(o=Math.min(o,this.getLength(l))))break}}catch(e){a.e(e)}finally{a.f()}return o}},{key:"readonly",value:function(e){return e?Object.freeze(e):e}},{key:"remove",value:function(e,t){return e&&t?e.filter((function(e){return e!==t})):e}},{key:"removeAll",value:function(e,t){return e&&t?e.filter((function(e){return!t.includes(e)})):e}},{key:"reverse",value:function(e,t,n){if(!e)return e;var r=e.slice(t,n);return r.reverse(),r}},{key:"singleton",value:function(e){return e?[e]:void 0}}]),e}(),p=function(){function e(){s()(this,e)}return c()(e,null,[{key:"allTrue",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isTrue(e)}))}},{key:"allNotTrue",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isNotTrue(e)}))}},{key:"allFalse",value:function(e){var t=this;return!!e&&e.length>0&&e.every((function(e){return t.isFalse(e)}))}},{key:"allNotFalse",value:function(e){var t=this;return!e||0===e.length||e.every((function(e){return t.isNotFalse(e)}))}},{key:"anyTrue",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isTrue(e)}))}},{key:"anyNotTrue",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isNotTrue(e)}))}},{key:"anyFalse",value:function(e){var t=this;return!!e&&e.length>0&&e.some((function(e){return t.isFalse(e)}))}},{key:"anyNotFalse",value:function(e){var t=this;return!e||0===e.length||e.some((function(e){return t.isNotFalse(e)}))}},{key:"isTrue",value:function(e){return"boolean"==typeof e?e:"number"==typeof e?e>0:"string"==typeof e?h.equalsAnyIgnoreCase(e,["true","yes","on","y","t","1"]):"function"==typeof e&&e()}},{key:"isNotTrue",value:function(e){return null==e||!this.isTrue(e)}},{key:"isFalse",value:function(e){return"boolean"==typeof e?!e:"number"==typeof e?e<=0:"string"==typeof e?h.equalsAnyIgnoreCase(e,["false","no","off","n","f","0"]):"function"==typeof e&&!e()}},{key:"isNotFalse",value:function(e){return null==e||!this.isFalse(e)}},{key:"toString",value:function(e,t,n,r){return v.isNil(e)?r:e?t:n}},{key:"toStringTrueFalse",value:function(e){return this.toString(e,"true","false",void 0)}},{key:"toStringOnOff",value:function(e){return this.toString(e,"on","off",void 0)}},{key:"toStringYesNo",value:function(e){return this.toString(e,"yes","no",void 0)}},{key:"toStringYN",value:function(e){return this.toString(e,"Y","N",void 0)}},{key:"toStringTF",value:function(e){return this.toString(e,"T","F",void 0)}},{key:"toString10",value:function(e){return this.toString(e,"1","0",void 0)}}]),e}(),d=function(){function e(){s()(this,e)}return c()(e,null,[{key:"addYear",value:function(e,t){if(!e||!t)return e;var n=new Date(e);return n.setFullYear(e.getFullYear()+t),n}},{key:"addMonth",value:function(e,t){if(!e||!t)return e;var n=new Date(e);return n.setMonth(e.getMonth()+t),n}},{key:"addDay",value:function(e,t){if(!e||!t)return e;var n=new Date(e);return n.setDate(e.getDate()+t),n}},{key:"formatDateTime",value:function(e,t){if(e&&t){var n={"y+":e.getFullYear(),"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours()%12==0?12:e.getHours()%12,"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()},r=t;for(var u in n){var i=new RegExp("(".concat(u,")")).exec(r);i&&(r=/(y+)/.test(u)?r.replace(i[1],n[u].toString().substring(4-i[1].length)):r.replace(i[1],1===i[1].length?n[u].toString():n[u].toString().padStart(i[1].length,"0")))}return r}}},{key:"getCurrentDate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd";return this.formatDateTime(new Date,e)}},{key:"getCurrentDateTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"yyyy-MM-dd hh:mm:ss";return this.formatDateTime(new Date,e)}},{key:"getCurrentTime",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hh:mm:ss";return this.formatDateTime(new Date,e)}},{key:"getStartOfYear",value:function(e){if(e){var t=new Date(e);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}}},{key:"getStartOfMonth",value:function(e){if(e){var t=new Date(e);return t.setDate(1),t.setHours(0,0,0,0),t}}},{key:"getStartOfDay",value:function(e){if(e){var t=new Date(e);return t.setHours(0,0,0,0),t}}},{key:"getEndOfYear",value:function(e){if(e){var t=new Date(e);return t.setFullYear(e.getFullYear()+1,0,0),t.setHours(23,59,59,999),t}}},{key:"getEndOfMonth",value:function(e){if(e){var t=new Date(e);return t.setFullYear(e.getFullYear(),e.getMonth()+1,0),t.setHours(23,59,59,999),t}}},{key:"getEndOfDay",value:function(e){if(e){var t=new Date(e);return t.setHours(23,59,59,999),t}}},{key:"getTimezone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getTimezoneOffset(),n=Math.abs(t),r=Math.floor(n/60),u=n%60,i=u>0?":"+("0"+u).slice(-2):"";return(t<0?"+":"-")+r+i}},{key:"isFirstDayOfMonth",value:function(e){return!!e&&1===e.getDate()}},{key:"isLastDayOfMonth",value:function(e){return!!e&&this.isSameDay(this.getEndOfDay(e),this.getEndOfMonth(e))}},{key:"isLeapYear",value:function(e){if(void 0===e)return!1;var t=e instanceof Date?e.getFullYear():e;return!((t%4||!(t%100))&&t%400)}},{key:"isSameYear",value:function(e,t){return!!e&&!!t&&e.getFullYear()===t.getFullYear()}},{key:"isSameMonth",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return!(!e||!t||e.getMonth()!==t.getMonth()||n&&e.getFullYear()!==t.getFullYear())}},{key:"isSameDay",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return!!e&&!!t&&e.getDate()===t.getDate()&&(!n||e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}},{key:"isWeekend",value:function(e){return!!e&&(0===e.getDay()||6===e.getDay())}},{key:"isYesterday",value:function(e){return!!e&&this.isSameDay(new Date,this.addDay(e,1))}},{key:"isTomorrow",value:function(e){return!!e&&this.isSameDay(new Date,this.addDay(e,-1))}}]),e}(),k=function(){function e(){s()(this,e)}return c()(e,null,[{key:"isJsonString",value:function(e){if(h.isBlank(e))return!1;try{if("string"==typeof e&&"object"===i()(JSON.parse(e)))return!0}catch(e){}return!1}},{key:"toJsonString",value:function(e){if("string"==typeof e&&e.length>0)try{var t=JSON.parse(e);if("object"===i()(t))return JSON.stringify(t)}catch(e){}if(v.isPlain(e))return JSON.stringify(e)}}]),e}(),m=n(925),b=n.n(m),x=function(){function e(){s()(this,e)}return c()(e,null,[{key:"forEach",value:function(e,n){if(e&&0!==e.size&&n){var r,u=t()(e.entries());try{for(u.s();!(r=u.n()).done;){var i=b()(r.value,2),o=i[0];n(i[1],o)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"forEachBreakable",value:function(e,n){if(e&&0!==e.size&&n){var r,u=t()(e.entries());try{for(u.s();!(r=u.n()).done;){var i=b()(r.value,2),o=i[0];if(!n(i[1],o))break}}catch(e){u.e(e)}finally{u.f()}}}},{key:"forEachIndexing",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0];n(o[1],a,u++)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"forEachIndexingBreakable",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0];if(!n(o[1],a,u++))break}}catch(e){i.e(e)}finally{i.f()}}}},{key:"forEachIndexingTailing",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0],l=o[1];if(!(u<e.size-1))return[a,l];n(l,a,u++)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"forEachTailing",value:function(e,n){if(e&&0!==e.size&&n){var r,u=0,i=t()(e.entries());try{for(i.s();!(r=i.n()).done;){var o=b()(r.value,2),a=o[0],l=o[1];if(!(u<e.size-1))return[a,l];n(l,a),u++}}catch(e){i.e(e)}finally{i.f()}}}}]),e}(),E=function(){function e(){s()(this,e)}return c()(e,null,[{key:"isInteger",value:function(e){return!!e&&Math.floor(e)===Math.ceil(e)}},{key:"isPositive",value:function(e){return void 0!==e&&e>0}},{key:"isNotPositive",value:function(e){return!this.isPositive(e)}},{key:"isNegative",value:function(e){return void 0!==e&&e<0}},{key:"isNotNegative",value:function(e){return!this.isNegative(e)}},{key:"toInteger",value:function(e){if(e)try{var t=Number.parseInt(e);return Number.isNaN(t)?void 0:t}catch(e){}}},{key:"toFloat",value:function(e){if(e)try{var t=Number.parseFloat(e);return Number.isNaN(t)?void 0:t}catch(e){}}},{key:"max",value:function(e){if(e&&0!==e.length){for(var t=e[0],n=1;n<e.length;n++)t<e[n]&&(t=e[n]);return t}}},{key:"min",value:function(e){if(e&&0!==e.length){for(var t=e[0],n=1;n<e.length;n++)t>e[n]&&(t=e[n]);return t}}},{key:"sum",value:function(e){return e?e.reduce((function(e,t){return e+t})):void 0}},{key:"average",value:function(e){return e?this.sum(e)/e.length:void 0}}]),e}(),N=function(){function e(){s()(this,e)}return c()(e,null,[{key:"randomBoolean",value:function(){return Math.random()>=.5}},{key:"randomElement",value:function(e){return e&&0!==e.length?e.at(this.randomInteger(0,e.length)):void 0}},{key:"randomElements",value:function(e,t){if(!(!e||0===e.length||!t||t<=0||t>Number.MAX_SAFE_INTEGER)){if(e.length<=t)return e;for(var n=new Set;n.size<t;)n.add(this.randomInteger(0,e.length));return e.filter((function(e,t){return n.has(t)}))}}},{key:"randomInteger",value:function(e,t){var n=this.randomNumber(e,t);return n?Math.floor(n):void 0}},{key:"randomIntegers",value:function(e,t,n){if(!(!e||e<=0||e>Number.MAX_SAFE_INTEGER)){for(var r=[],u=0;u<e;u++){var i=this.randomInteger(t,n);if(!i)break;r.push(i)}return r}}},{key:"randomNumber",value:function(e,t){var n=void 0!==e?e:Number.MIN_SAFE_INTEGER,r=void 0!==t?t:Number.MAX_SAFE_INTEGER;return n>r?void 0:n+(r-n)*Math.random()}},{key:"randomNumbers",value:function(e,t,n){if(!(!e||e<=0||e>Number.MAX_SAFE_INTEGER)){for(var r=[],u=0;u<e;u++){var i=this.randomNumber(t,n);if(!i)break;r.push(i)}return r}}},{key:"randomString",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(!(!e||e<=0||t&&t<e||0===n.length)){if(void 0===t&&1===n.length)return n.repeat(e);for(var r=[],u=void 0===t?e:this.randomInteger(e,t),i=h.toChars(n),o=0;o<u;o++)r.push(this.randomElement(i));return h.fromChars(r)}}},{key:"randomStrings",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(!(!e||e<=0||e>Number.MAX_SAFE_INTEGER||!t||t<=0)){for(var u=[],i=0;i<e;i++){var o=this.randomString(t,n,r);if(!o)break;u.push(o)}return u}}}]),e}(),S=function(){function e(){s()(this,e)}return c()(e,null,[{key:"sleep",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;return new Promise((function(t){setTimeout(t,e)}))}}]),e}(),I=function(){function e(){s()(this,e)}return c()(e,null,[{key:"forEach",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";if(e&&0!==e.length&&n&&r){var u,i=t()(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;n(o,e);var a=v.getProp(o,r);a&&Array.isArray(a)&&this.forEach(a,n,r)}}catch(e){i.e(e)}finally{i.f()}}}}]),e}()}(),r}()}));
{
"name": "@yookue/ts-lang-utils",
"version": "0.1.56",
"version": "0.1.57",
"title": "TsLangUtils",

@@ -44,3 +44,3 @@ "description": "Common lang utilities for typescript",

"dependencies": {
"@babel/runtime": "^7.25.4"
"@babel/runtime": "^7.25.6"
},

@@ -47,0 +47,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc