es-toolkit 1.13.1-dev.392 → 1.13.1-dev.394
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunk/{isArguments-UkjX2G.js → isFunction-Bab14Q.js} +0 -16
- package/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/index.d.mts +4 -4
- package/dist/compat/index.d.ts +4 -4
- package/dist/compat/index.js +31 -14
- package/dist/compat/index.mjs +4 -4
- package/dist/{predicate → compat/predicate}/isArguments.mjs +1 -1
- package/dist/compat/predicate/isArray.d.mts +3 -4
- package/dist/compat/predicate/isArray.d.ts +3 -4
- package/dist/{predicate → compat/predicate}/isArrayLike.mjs +1 -1
- package/dist/{string → compat/string}/padStart.d.mts +5 -5
- package/dist/{string → compat/string}/padStart.d.ts +5 -5
- package/dist/compat/string/padStart.mjs +5 -0
- package/dist/index.d.mts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +8 -12
- package/dist/index.mjs +0 -4
- package/dist/predicate/index.d.mts +0 -3
- package/dist/predicate/index.d.ts +0 -3
- package/dist/predicate/index.js +8 -11
- package/dist/predicate/index.mjs +0 -3
- package/dist/string/index.d.mts +0 -1
- package/dist/string/index.d.ts +0 -1
- package/dist/string/index.js +0 -8
- package/dist/string/index.mjs +0 -1
- package/package.json +1 -1
- package/dist/string/padStart.mjs +0 -8
- /package/dist/{predicate → compat/predicate}/isArguments.d.mts +0 -0
- /package/dist/{predicate → compat/predicate}/isArguments.d.ts +0 -0
- /package/dist/{predicate → compat/predicate}/isArrayLike.d.mts +0 -0
- /package/dist/{predicate → compat/predicate}/isArrayLike.d.ts +0 -0
- /package/dist/{predicate → compat/predicate}/isObjectLike.d.mts +0 -0
- /package/dist/{predicate → compat/predicate}/isObjectLike.d.ts +0 -0
- /package/dist/{predicate → compat/predicate}/isObjectLike.mjs +0 -0
package/dist/compat/index.d.mts
CHANGED
|
@@ -81,10 +81,7 @@ export { isNull } from '../predicate/isNull.mjs';
|
|
|
81
81
|
export { isUndefined } from '../predicate/isUndefined.mjs';
|
|
82
82
|
export { isLength } from '../predicate/isLength.mjs';
|
|
83
83
|
export { isFunction } from '../predicate/isFunction.mjs';
|
|
84
|
-
export { isArrayLike } from '../predicate/isArrayLike.mjs';
|
|
85
84
|
export { isPrimitive } from '../predicate/isPrimitive.mjs';
|
|
86
|
-
export { isObjectLike } from '../predicate/isObjectLike.mjs';
|
|
87
|
-
export { isArguments } from '../predicate/isArguments.mjs';
|
|
88
85
|
export { delay } from '../promise/delay.mjs';
|
|
89
86
|
export { withTimeout } from '../promise/withTimeout.mjs';
|
|
90
87
|
export { camelCase } from '../string/camelCase.mjs';
|
|
@@ -93,7 +90,6 @@ export { kebabCase } from '../string/kebabCase.mjs';
|
|
|
93
90
|
export { lowerCase } from '../string/lowerCase.mjs';
|
|
94
91
|
export { startCase } from '../string/startCase.mjs';
|
|
95
92
|
export { capitalize } from '../string/capitalize.mjs';
|
|
96
|
-
export { padStart } from '../string/padStart.mjs';
|
|
97
93
|
export { chunk } from './array/chunk.mjs';
|
|
98
94
|
export { concat } from './array/concat.mjs';
|
|
99
95
|
export { difference } from './array/difference.mjs';
|
|
@@ -111,11 +107,15 @@ export { property } from './object/property.mjs';
|
|
|
111
107
|
export { mapKeys } from './object/mapKeys.mjs';
|
|
112
108
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
113
109
|
export { isArray } from './predicate/isArray.mjs';
|
|
110
|
+
export { isArguments } from './predicate/isArguments.mjs';
|
|
111
|
+
export { isArrayLike } from './predicate/isArrayLike.mjs';
|
|
112
|
+
export { isObjectLike } from './predicate/isObjectLike.mjs';
|
|
114
113
|
export { isBoolean } from './predicate/isBoolean.mjs';
|
|
115
114
|
export { isTypedArray } from './predicate/isTypedArray.mjs';
|
|
116
115
|
export { isMatch } from './predicate/isMatch.mjs';
|
|
117
116
|
export { matches } from './predicate/matches.mjs';
|
|
118
117
|
export { startsWith } from './string/startsWith.mjs';
|
|
119
118
|
export { endsWith } from './string/endsWith.mjs';
|
|
119
|
+
export { padStart } from './string/padStart.mjs';
|
|
120
120
|
export { max } from './math/max.mjs';
|
|
121
121
|
export { min } from './math/min.mjs';
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -81,10 +81,7 @@ export { isNull } from '../predicate/isNull.js';
|
|
|
81
81
|
export { isUndefined } from '../predicate/isUndefined.js';
|
|
82
82
|
export { isLength } from '../predicate/isLength.js';
|
|
83
83
|
export { isFunction } from '../predicate/isFunction.js';
|
|
84
|
-
export { isArrayLike } from '../predicate/isArrayLike.js';
|
|
85
84
|
export { isPrimitive } from '../predicate/isPrimitive.js';
|
|
86
|
-
export { isObjectLike } from '../predicate/isObjectLike.js';
|
|
87
|
-
export { isArguments } from '../predicate/isArguments.js';
|
|
88
85
|
export { delay } from '../promise/delay.js';
|
|
89
86
|
export { withTimeout } from '../promise/withTimeout.js';
|
|
90
87
|
export { camelCase } from '../string/camelCase.js';
|
|
@@ -93,7 +90,6 @@ export { kebabCase } from '../string/kebabCase.js';
|
|
|
93
90
|
export { lowerCase } from '../string/lowerCase.js';
|
|
94
91
|
export { startCase } from '../string/startCase.js';
|
|
95
92
|
export { capitalize } from '../string/capitalize.js';
|
|
96
|
-
export { padStart } from '../string/padStart.js';
|
|
97
93
|
export { chunk } from './array/chunk.js';
|
|
98
94
|
export { concat } from './array/concat.js';
|
|
99
95
|
export { difference } from './array/difference.js';
|
|
@@ -111,11 +107,15 @@ export { property } from './object/property.js';
|
|
|
111
107
|
export { mapKeys } from './object/mapKeys.js';
|
|
112
108
|
export { isPlainObject } from './predicate/isPlainObject.js';
|
|
113
109
|
export { isArray } from './predicate/isArray.js';
|
|
110
|
+
export { isArguments } from './predicate/isArguments.js';
|
|
111
|
+
export { isArrayLike } from './predicate/isArrayLike.js';
|
|
112
|
+
export { isObjectLike } from './predicate/isObjectLike.js';
|
|
114
113
|
export { isBoolean } from './predicate/isBoolean.js';
|
|
115
114
|
export { isTypedArray } from './predicate/isTypedArray.js';
|
|
116
115
|
export { isMatch } from './predicate/isMatch.js';
|
|
117
116
|
export { matches } from './predicate/matches.js';
|
|
118
117
|
export { startsWith } from './string/startsWith.js';
|
|
119
118
|
export { endsWith } from './string/endsWith.js';
|
|
119
|
+
export { padStart } from './string/padStart.js';
|
|
120
120
|
export { max } from './math/max.js';
|
|
121
121
|
export { min } from './math/min.js';
|
package/dist/compat/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const function_index = require('../function/index.js');
|
|
|
8
8
|
const math_index = require('../math/index.js');
|
|
9
9
|
const randomInt = require('../_chunk/randomInt-CF7bZK.js');
|
|
10
10
|
const object_index = require('../object/index.js');
|
|
11
|
-
const
|
|
11
|
+
const isFunction = require('../_chunk/isFunction-Bab14Q.js');
|
|
12
12
|
const isTypedArray$1 = require('../_chunk/isTypedArray-BBEkFl.js');
|
|
13
13
|
const string_index = require('../string/index.js');
|
|
14
14
|
|
|
@@ -79,7 +79,7 @@ function flattenDepth(value, depth = 1) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
function size(target) {
|
|
82
|
-
if (
|
|
82
|
+
if (isFunction.isNil(target)) {
|
|
83
83
|
return 0;
|
|
84
84
|
}
|
|
85
85
|
if (target instanceof Map || target instanceof Set) {
|
|
@@ -310,11 +310,24 @@ function isArray(value) {
|
|
|
310
310
|
return Array.isArray(value);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
function isArguments(value) {
|
|
314
|
+
return value !== null && typeof value === 'object' && isFunction.getTag(value) === '[object Arguments]';
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function isArrayLike(value) {
|
|
318
|
+
return value != null && typeof value !== "function" &&
|
|
319
|
+
isFunction.isLength(value.length);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function isObjectLike(value) {
|
|
323
|
+
return typeof value === 'object' && value !== null;
|
|
324
|
+
}
|
|
325
|
+
|
|
313
326
|
function isBoolean(x) {
|
|
314
327
|
if (x === true || x === false) {
|
|
315
328
|
return true;
|
|
316
329
|
}
|
|
317
|
-
if (typeof x === 'object' && x != null &&
|
|
330
|
+
if (typeof x === 'object' && x != null && isFunction.getTag(x) === '[object Boolean]') {
|
|
318
331
|
return true;
|
|
319
332
|
}
|
|
320
333
|
return false;
|
|
@@ -437,6 +450,10 @@ const endsWith = (str, target, position = str.length) => {
|
|
|
437
450
|
return str.endsWith(target, position);
|
|
438
451
|
};
|
|
439
452
|
|
|
453
|
+
function padStart(str, length = 0, chars = ' ') {
|
|
454
|
+
return str.padStart(length, chars);
|
|
455
|
+
}
|
|
456
|
+
|
|
440
457
|
function max(items = []) {
|
|
441
458
|
let maxElement = items[0];
|
|
442
459
|
let max = undefined;
|
|
@@ -540,22 +557,18 @@ exports.omit = object_index.omit;
|
|
|
540
557
|
exports.omitBy = object_index.omitBy;
|
|
541
558
|
exports.pick = object_index.pick;
|
|
542
559
|
exports.pickBy = object_index.pickBy;
|
|
543
|
-
exports.
|
|
544
|
-
exports.
|
|
545
|
-
exports.
|
|
546
|
-
exports.
|
|
547
|
-
exports.
|
|
548
|
-
exports.
|
|
549
|
-
exports.
|
|
550
|
-
exports.isNull = isArguments.isNull;
|
|
551
|
-
exports.isObjectLike = isArguments.isObjectLike;
|
|
552
|
-
exports.isUndefined = isArguments.isUndefined;
|
|
560
|
+
exports.isEqual = isFunction.isEqual;
|
|
561
|
+
exports.isFunction = isFunction.isFunction;
|
|
562
|
+
exports.isLength = isFunction.isLength;
|
|
563
|
+
exports.isNil = isFunction.isNil;
|
|
564
|
+
exports.isNotNil = isFunction.isNotNil;
|
|
565
|
+
exports.isNull = isFunction.isNull;
|
|
566
|
+
exports.isUndefined = isFunction.isUndefined;
|
|
553
567
|
exports.isPrimitive = isTypedArray$1.isPrimitive;
|
|
554
568
|
exports.camelCase = string_index.camelCase;
|
|
555
569
|
exports.capitalize = string_index.capitalize;
|
|
556
570
|
exports.kebabCase = string_index.kebabCase;
|
|
557
571
|
exports.lowerCase = string_index.lowerCase;
|
|
558
|
-
exports.padStart = string_index.padStart;
|
|
559
572
|
exports.snakeCase = string_index.snakeCase;
|
|
560
573
|
exports.startCase = string_index.startCase;
|
|
561
574
|
exports.ary = ary;
|
|
@@ -569,15 +582,19 @@ exports.flatten = flatten;
|
|
|
569
582
|
exports.flattenDeep = flattenDeep;
|
|
570
583
|
exports.flattenDepth = flattenDepth;
|
|
571
584
|
exports.get = get;
|
|
585
|
+
exports.isArguments = isArguments;
|
|
572
586
|
exports.isArray = isArray;
|
|
587
|
+
exports.isArrayLike = isArrayLike;
|
|
573
588
|
exports.isBoolean = isBoolean;
|
|
574
589
|
exports.isMatch = isMatch;
|
|
590
|
+
exports.isObjectLike = isObjectLike;
|
|
575
591
|
exports.isPlainObject = isPlainObject;
|
|
576
592
|
exports.isTypedArray = isTypedArray;
|
|
577
593
|
exports.mapKeys = mapKeys;
|
|
578
594
|
exports.matches = matches;
|
|
579
595
|
exports.max = max;
|
|
580
596
|
exports.min = min;
|
|
597
|
+
exports.padStart = padStart;
|
|
581
598
|
exports.property = property;
|
|
582
599
|
exports.set = set;
|
|
583
600
|
exports.size = size;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -81,10 +81,7 @@ export { isNull } from '../predicate/isNull.mjs';
|
|
|
81
81
|
export { isUndefined } from '../predicate/isUndefined.mjs';
|
|
82
82
|
export { isLength } from '../predicate/isLength.mjs';
|
|
83
83
|
export { isFunction } from '../predicate/isFunction.mjs';
|
|
84
|
-
export { isArrayLike } from '../predicate/isArrayLike.mjs';
|
|
85
84
|
export { isPrimitive } from '../predicate/isPrimitive.mjs';
|
|
86
|
-
export { isObjectLike } from '../predicate/isObjectLike.mjs';
|
|
87
|
-
export { isArguments } from '../predicate/isArguments.mjs';
|
|
88
85
|
export { delay } from '../promise/delay.mjs';
|
|
89
86
|
export { withTimeout } from '../promise/withTimeout.mjs';
|
|
90
87
|
export { camelCase } from '../string/camelCase.mjs';
|
|
@@ -93,7 +90,6 @@ export { kebabCase } from '../string/kebabCase.mjs';
|
|
|
93
90
|
export { lowerCase } from '../string/lowerCase.mjs';
|
|
94
91
|
export { startCase } from '../string/startCase.mjs';
|
|
95
92
|
export { capitalize } from '../string/capitalize.mjs';
|
|
96
|
-
export { padStart } from '../string/padStart.mjs';
|
|
97
93
|
export { chunk } from './array/chunk.mjs';
|
|
98
94
|
export { concat } from './array/concat.mjs';
|
|
99
95
|
export { difference } from './array/difference.mjs';
|
|
@@ -111,11 +107,15 @@ export { property } from './object/property.mjs';
|
|
|
111
107
|
export { mapKeys } from './object/mapKeys.mjs';
|
|
112
108
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
113
109
|
export { isArray } from './predicate/isArray.mjs';
|
|
110
|
+
export { isArguments } from './predicate/isArguments.mjs';
|
|
111
|
+
export { isArrayLike } from './predicate/isArrayLike.mjs';
|
|
112
|
+
export { isObjectLike } from './predicate/isObjectLike.mjs';
|
|
114
113
|
export { isBoolean } from './predicate/isBoolean.mjs';
|
|
115
114
|
export { isTypedArray } from './predicate/isTypedArray.mjs';
|
|
116
115
|
export { isMatch } from './predicate/isMatch.mjs';
|
|
117
116
|
export { matches } from './predicate/matches.mjs';
|
|
118
117
|
export { startsWith } from './string/startsWith.mjs';
|
|
119
118
|
export { endsWith } from './string/endsWith.mjs';
|
|
119
|
+
export { padStart } from './string/padStart.mjs';
|
|
120
120
|
export { max } from './math/max.mjs';
|
|
121
121
|
export { min } from './math/min.mjs';
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @returns {value is Extract<T, unknown[]>} `true` if the value is an array, `false` otherwise.
|
|
9
|
+
* @param {unknown} value - The value to test if it is an array.
|
|
10
|
+
* @returns {value is any[]} `true` if the value is an array, `false` otherwise.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* const value1 = [1, 2, 3];
|
|
@@ -19,6 +18,6 @@
|
|
|
19
18
|
* console.log(isArray(value2)); // false
|
|
20
19
|
* console.log(isArray(value3)); // false
|
|
21
20
|
*/
|
|
22
|
-
declare function isArray
|
|
21
|
+
declare function isArray(value?: unknown): value is any[];
|
|
23
22
|
|
|
24
23
|
export { isArray };
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @returns {value is Extract<T, unknown[]>} `true` if the value is an array, `false` otherwise.
|
|
9
|
+
* @param {unknown} value - The value to test if it is an array.
|
|
10
|
+
* @returns {value is any[]} `true` if the value is an array, `false` otherwise.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* const value1 = [1, 2, 3];
|
|
@@ -19,6 +18,6 @@
|
|
|
19
18
|
* console.log(isArray(value2)); // false
|
|
20
19
|
* console.log(isArray(value3)); // false
|
|
21
20
|
*/
|
|
22
|
-
declare function isArray
|
|
21
|
+
declare function isArray(value?: unknown): value is any[];
|
|
23
22
|
|
|
24
23
|
export { isArray };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pads the start of a string with a given character until it reaches the specified length.
|
|
3
|
+
*
|
|
3
4
|
* If the length is less than or equal to the original string's length, or if the padding character is an empty string,
|
|
4
5
|
* the original string is returned unchanged.
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
-
* @param {
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {string} [chars=' '] - The character(s) to use for padding. Default is a single space.
|
|
7
|
+
* @param {string} str - The string to pad.
|
|
8
|
+
* @param {number} [length] - The length of the resulting string once padded.
|
|
9
|
+
* @param {string} [chars] - The character(s) to use for padding.
|
|
10
10
|
* @returns {string} - The padded string, or the original string if padding is not required.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
* const result3 = padStart('abc', 3); // result will be 'abc'
|
|
16
16
|
* const result4 = padStart('abc', 2); // result will be 'abc'
|
|
17
17
|
*/
|
|
18
|
-
declare
|
|
18
|
+
declare function padStart(str: string, length?: number, chars?: string): string;
|
|
19
19
|
|
|
20
20
|
export { padStart };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pads the start of a string with a given character until it reaches the specified length.
|
|
3
|
+
*
|
|
3
4
|
* If the length is less than or equal to the original string's length, or if the padding character is an empty string,
|
|
4
5
|
* the original string is returned unchanged.
|
|
5
6
|
*
|
|
6
|
-
* @
|
|
7
|
-
* @param {
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {string} [chars=' '] - The character(s) to use for padding. Default is a single space.
|
|
7
|
+
* @param {string} str - The string to pad.
|
|
8
|
+
* @param {number} [length] - The length of the resulting string once padded.
|
|
9
|
+
* @param {string} [chars] - The character(s) to use for padding.
|
|
10
10
|
* @returns {string} - The padded string, or the original string if padding is not required.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
* const result3 = padStart('abc', 3); // result will be 'abc'
|
|
16
16
|
* const result4 = padStart('abc', 2); // result will be 'abc'
|
|
17
17
|
*/
|
|
18
|
-
declare
|
|
18
|
+
declare function padStart(str: string, length?: number, chars?: string): string;
|
|
19
19
|
|
|
20
20
|
export { padStart };
|
package/dist/index.d.mts
CHANGED
|
@@ -89,11 +89,8 @@ export { isUndefined } from './predicate/isUndefined.mjs';
|
|
|
89
89
|
export { isLength } from './predicate/isLength.mjs';
|
|
90
90
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
91
91
|
export { isFunction } from './predicate/isFunction.mjs';
|
|
92
|
-
export { isArrayLike } from './predicate/isArrayLike.mjs';
|
|
93
92
|
export { isTypedArray } from './predicate/isTypedArray.mjs';
|
|
94
93
|
export { isPrimitive } from './predicate/isPrimitive.mjs';
|
|
95
|
-
export { isObjectLike } from './predicate/isObjectLike.mjs';
|
|
96
|
-
export { isArguments } from './predicate/isArguments.mjs';
|
|
97
94
|
export { isBoolean } from './predicate/isBoolean.mjs';
|
|
98
95
|
export { delay } from './promise/delay.mjs';
|
|
99
96
|
export { withTimeout } from './promise/withTimeout.mjs';
|
|
@@ -103,4 +100,3 @@ export { kebabCase } from './string/kebabCase.mjs';
|
|
|
103
100
|
export { lowerCase } from './string/lowerCase.mjs';
|
|
104
101
|
export { startCase } from './string/startCase.mjs';
|
|
105
102
|
export { capitalize } from './string/capitalize.mjs';
|
|
106
|
-
export { padStart } from './string/padStart.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -89,11 +89,8 @@ export { isUndefined } from './predicate/isUndefined.js';
|
|
|
89
89
|
export { isLength } from './predicate/isLength.js';
|
|
90
90
|
export { isPlainObject } from './predicate/isPlainObject.js';
|
|
91
91
|
export { isFunction } from './predicate/isFunction.js';
|
|
92
|
-
export { isArrayLike } from './predicate/isArrayLike.js';
|
|
93
92
|
export { isTypedArray } from './predicate/isTypedArray.js';
|
|
94
93
|
export { isPrimitive } from './predicate/isPrimitive.js';
|
|
95
|
-
export { isObjectLike } from './predicate/isObjectLike.js';
|
|
96
|
-
export { isArguments } from './predicate/isArguments.js';
|
|
97
94
|
export { isBoolean } from './predicate/isBoolean.js';
|
|
98
95
|
export { delay } from './promise/delay.js';
|
|
99
96
|
export { withTimeout } from './promise/withTimeout.js';
|
|
@@ -103,4 +100,3 @@ export { kebabCase } from './string/kebabCase.js';
|
|
|
103
100
|
export { lowerCase } from './string/lowerCase.js';
|
|
104
101
|
export { startCase } from './string/startCase.js';
|
|
105
102
|
export { capitalize } from './string/capitalize.js';
|
|
106
|
-
export { padStart } from './string/padStart.js';
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const function_index = require('./function/index.js');
|
|
|
9
9
|
const math_index = require('./math/index.js');
|
|
10
10
|
const randomInt = require('./_chunk/randomInt-CF7bZK.js');
|
|
11
11
|
const object_index = require('./object/index.js');
|
|
12
|
-
const
|
|
12
|
+
const isFunction = require('./_chunk/isFunction-Bab14Q.js');
|
|
13
13
|
const isTypedArray = require('./_chunk/isTypedArray-BBEkFl.js');
|
|
14
14
|
const predicate_index = require('./predicate/index.js');
|
|
15
15
|
const string_index = require('./string/index.js');
|
|
@@ -101,16 +101,13 @@ exports.omit = object_index.omit;
|
|
|
101
101
|
exports.omitBy = object_index.omitBy;
|
|
102
102
|
exports.pick = object_index.pick;
|
|
103
103
|
exports.pickBy = object_index.pickBy;
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.isNull = isArguments.isNull;
|
|
112
|
-
exports.isObjectLike = isArguments.isObjectLike;
|
|
113
|
-
exports.isUndefined = isArguments.isUndefined;
|
|
104
|
+
exports.isEqual = isFunction.isEqual;
|
|
105
|
+
exports.isFunction = isFunction.isFunction;
|
|
106
|
+
exports.isLength = isFunction.isLength;
|
|
107
|
+
exports.isNil = isFunction.isNil;
|
|
108
|
+
exports.isNotNil = isFunction.isNotNil;
|
|
109
|
+
exports.isNull = isFunction.isNull;
|
|
110
|
+
exports.isUndefined = isFunction.isUndefined;
|
|
114
111
|
exports.isPlainObject = isTypedArray.isPlainObject;
|
|
115
112
|
exports.isPrimitive = isTypedArray.isPrimitive;
|
|
116
113
|
exports.isTypedArray = isTypedArray.isTypedArray;
|
|
@@ -119,6 +116,5 @@ exports.camelCase = string_index.camelCase;
|
|
|
119
116
|
exports.capitalize = string_index.capitalize;
|
|
120
117
|
exports.kebabCase = string_index.kebabCase;
|
|
121
118
|
exports.lowerCase = string_index.lowerCase;
|
|
122
|
-
exports.padStart = string_index.padStart;
|
|
123
119
|
exports.snakeCase = string_index.snakeCase;
|
|
124
120
|
exports.startCase = string_index.startCase;
|
package/dist/index.mjs
CHANGED
|
@@ -89,11 +89,8 @@ export { isUndefined } from './predicate/isUndefined.mjs';
|
|
|
89
89
|
export { isLength } from './predicate/isLength.mjs';
|
|
90
90
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
91
91
|
export { isFunction } from './predicate/isFunction.mjs';
|
|
92
|
-
export { isArrayLike } from './predicate/isArrayLike.mjs';
|
|
93
92
|
export { isTypedArray } from './predicate/isTypedArray.mjs';
|
|
94
93
|
export { isPrimitive } from './predicate/isPrimitive.mjs';
|
|
95
|
-
export { isObjectLike } from './predicate/isObjectLike.mjs';
|
|
96
|
-
export { isArguments } from './predicate/isArguments.mjs';
|
|
97
94
|
export { isBoolean } from './predicate/isBoolean.mjs';
|
|
98
95
|
export { delay } from './promise/delay.mjs';
|
|
99
96
|
export { withTimeout } from './promise/withTimeout.mjs';
|
|
@@ -103,4 +100,3 @@ export { kebabCase } from './string/kebabCase.mjs';
|
|
|
103
100
|
export { lowerCase } from './string/lowerCase.mjs';
|
|
104
101
|
export { startCase } from './string/startCase.mjs';
|
|
105
102
|
export { capitalize } from './string/capitalize.mjs';
|
|
106
|
-
export { padStart } from './string/padStart.mjs';
|
|
@@ -6,9 +6,6 @@ export { isUndefined } from './isUndefined.mjs';
|
|
|
6
6
|
export { isLength } from './isLength.mjs';
|
|
7
7
|
export { isPlainObject } from './isPlainObject.mjs';
|
|
8
8
|
export { isFunction } from './isFunction.mjs';
|
|
9
|
-
export { isArrayLike } from './isArrayLike.mjs';
|
|
10
9
|
export { isTypedArray } from './isTypedArray.mjs';
|
|
11
10
|
export { isPrimitive } from './isPrimitive.mjs';
|
|
12
|
-
export { isObjectLike } from './isObjectLike.mjs';
|
|
13
|
-
export { isArguments } from './isArguments.mjs';
|
|
14
11
|
export { isBoolean } from './isBoolean.mjs';
|
|
@@ -6,9 +6,6 @@ export { isUndefined } from './isUndefined.js';
|
|
|
6
6
|
export { isLength } from './isLength.js';
|
|
7
7
|
export { isPlainObject } from './isPlainObject.js';
|
|
8
8
|
export { isFunction } from './isFunction.js';
|
|
9
|
-
export { isArrayLike } from './isArrayLike.js';
|
|
10
9
|
export { isTypedArray } from './isTypedArray.js';
|
|
11
10
|
export { isPrimitive } from './isPrimitive.js';
|
|
12
|
-
export { isObjectLike } from './isObjectLike.js';
|
|
13
|
-
export { isArguments } from './isArguments.js';
|
|
14
11
|
export { isBoolean } from './isBoolean.js';
|
package/dist/predicate/index.js
CHANGED
|
@@ -2,23 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const isFunction = require('../_chunk/isFunction-Bab14Q.js');
|
|
6
6
|
const isTypedArray = require('../_chunk/isTypedArray-BBEkFl.js');
|
|
7
7
|
|
|
8
8
|
function isBoolean(x) {
|
|
9
9
|
return typeof x === 'boolean';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.isNull = isArguments.isNull;
|
|
20
|
-
exports.isObjectLike = isArguments.isObjectLike;
|
|
21
|
-
exports.isUndefined = isArguments.isUndefined;
|
|
12
|
+
exports.isEqual = isFunction.isEqual;
|
|
13
|
+
exports.isFunction = isFunction.isFunction;
|
|
14
|
+
exports.isLength = isFunction.isLength;
|
|
15
|
+
exports.isNil = isFunction.isNil;
|
|
16
|
+
exports.isNotNil = isFunction.isNotNil;
|
|
17
|
+
exports.isNull = isFunction.isNull;
|
|
18
|
+
exports.isUndefined = isFunction.isUndefined;
|
|
22
19
|
exports.isPlainObject = isTypedArray.isPlainObject;
|
|
23
20
|
exports.isPrimitive = isTypedArray.isPrimitive;
|
|
24
21
|
exports.isTypedArray = isTypedArray.isTypedArray;
|
package/dist/predicate/index.mjs
CHANGED
|
@@ -6,9 +6,6 @@ export { isUndefined } from './isUndefined.mjs';
|
|
|
6
6
|
export { isLength } from './isLength.mjs';
|
|
7
7
|
export { isPlainObject } from './isPlainObject.mjs';
|
|
8
8
|
export { isFunction } from './isFunction.mjs';
|
|
9
|
-
export { isArrayLike } from './isArrayLike.mjs';
|
|
10
9
|
export { isTypedArray } from './isTypedArray.mjs';
|
|
11
10
|
export { isPrimitive } from './isPrimitive.mjs';
|
|
12
|
-
export { isObjectLike } from './isObjectLike.mjs';
|
|
13
|
-
export { isArguments } from './isArguments.mjs';
|
|
14
11
|
export { isBoolean } from './isBoolean.mjs';
|
package/dist/string/index.d.mts
CHANGED
package/dist/string/index.d.ts
CHANGED
package/dist/string/index.js
CHANGED
|
@@ -52,17 +52,9 @@ function startCase(str) {
|
|
|
52
52
|
return result;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const padStart = (str, length = 0, chars = ' ') => {
|
|
56
|
-
if (Number.isSafeInteger(length) && length > str.length && chars.length > 0) {
|
|
57
|
-
return str.padStart(length, chars);
|
|
58
|
-
}
|
|
59
|
-
return str;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
55
|
exports.camelCase = camelCase;
|
|
63
56
|
exports.capitalize = capitalize;
|
|
64
57
|
exports.kebabCase = kebabCase;
|
|
65
58
|
exports.lowerCase = lowerCase;
|
|
66
|
-
exports.padStart = padStart;
|
|
67
59
|
exports.snakeCase = snakeCase;
|
|
68
60
|
exports.startCase = startCase;
|
package/dist/string/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.13.1-dev.
|
|
4
|
+
"version": "1.13.1-dev.394+17d8afa2",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|
package/dist/string/padStart.mjs
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|