es-toolkit 1.49.0 → 1.50.0-dev.1977
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/array/partition.d.mts +5 -4
- package/dist/array/partition.d.ts +5 -4
- package/dist/array/unzipWith.js +1 -1
- package/dist/array/unzipWith.mjs +1 -1
- package/dist/browser.global.js +3 -3
- package/dist/compat/_internal/ListIterateeCustom.d.mts +3 -2
- package/dist/compat/_internal/ListIterateeCustom.d.ts +3 -2
- package/dist/compat/_internal/assignValue.js +2 -3
- package/dist/compat/_internal/assignValue.mjs +2 -3
- package/dist/compat/_internal/createPadding.js +14 -0
- package/dist/compat/_internal/createPadding.mjs +13 -0
- package/dist/compat/_internal/isDeepKey.js +14 -1
- package/dist/compat/_internal/isDeepKey.mjs +14 -1
- package/dist/compat/_internal/isIterateeCall.js +2 -3
- package/dist/compat/_internal/isIterateeCall.mjs +2 -3
- package/dist/compat/_internal/regexMultiByte.js +11 -0
- package/dist/compat/_internal/regexMultiByte.mjs +11 -0
- package/dist/compat/array/every.js +5 -24
- package/dist/compat/array/every.mjs +5 -24
- package/dist/compat/array/filter.d.mts +7 -3
- package/dist/compat/array/filter.d.ts +7 -3
- package/dist/compat/array/filter.js +11 -11
- package/dist/compat/array/filter.mjs +11 -11
- package/dist/compat/array/find.d.mts +10 -6
- package/dist/compat/array/find.d.ts +10 -6
- package/dist/compat/array/find.js +1 -1
- package/dist/compat/array/find.mjs +1 -1
- package/dist/compat/array/findIndex.d.mts +0 -1
- package/dist/compat/array/findIndex.d.ts +0 -1
- package/dist/compat/array/findIndex.js +2 -1
- package/dist/compat/array/findIndex.mjs +2 -1
- package/dist/compat/array/findLast.d.mts +1 -1
- package/dist/compat/array/findLast.d.ts +1 -1
- package/dist/compat/array/findLast.js +12 -12
- package/dist/compat/array/findLast.mjs +12 -12
- package/dist/compat/array/findLastIndex.js +1 -0
- package/dist/compat/array/findLastIndex.mjs +1 -0
- package/dist/compat/array/flatMap.js +3 -2
- package/dist/compat/array/flatMap.mjs +3 -2
- package/dist/compat/array/flatMapDepth.js +2 -2
- package/dist/compat/array/flatMapDepth.mjs +2 -2
- package/dist/compat/array/flatten.d.mts +4 -5
- package/dist/compat/array/flatten.d.ts +4 -5
- package/dist/compat/array/flatten.js +14 -15
- package/dist/compat/array/flatten.mjs +14 -15
- package/dist/compat/array/flattenDeep.d.mts +1 -1
- package/dist/compat/array/flattenDeep.d.ts +1 -1
- package/dist/compat/array/flattenDeep.js +2 -2
- package/dist/compat/array/flattenDeep.mjs +2 -2
- package/dist/compat/array/flattenDepth.js +18 -2
- package/dist/compat/array/flattenDepth.mjs +18 -2
- package/dist/compat/array/groupBy.js +5 -4
- package/dist/compat/array/groupBy.mjs +4 -3
- package/dist/compat/array/includes.js +8 -3
- package/dist/compat/array/includes.mjs +8 -3
- package/dist/compat/array/indexOf.js +2 -1
- package/dist/compat/array/indexOf.mjs +2 -1
- package/dist/compat/array/intersectionBy.js +12 -5
- package/dist/compat/array/intersectionBy.mjs +12 -5
- package/dist/compat/array/intersectionWith.js +2 -3
- package/dist/compat/array/intersectionWith.mjs +2 -3
- package/dist/compat/array/invokeMap.js +3 -7
- package/dist/compat/array/invokeMap.mjs +3 -4
- package/dist/compat/array/lastIndexOf.js +3 -2
- package/dist/compat/array/lastIndexOf.mjs +3 -2
- package/dist/compat/array/nth.js +2 -2
- package/dist/compat/array/nth.mjs +2 -2
- package/dist/compat/array/pullAllWith.js +2 -3
- package/dist/compat/array/pullAllWith.mjs +2 -3
- package/dist/compat/array/size.js +2 -0
- package/dist/compat/array/size.mjs +2 -0
- package/dist/compat/array/sortedIndexOf.js +2 -3
- package/dist/compat/array/sortedIndexOf.mjs +2 -3
- package/dist/compat/array/sortedLastIndexOf.js +2 -3
- package/dist/compat/array/sortedLastIndexOf.mjs +2 -3
- package/dist/compat/compat.d.mts +4 -3
- package/dist/compat/compat.d.ts +4 -3
- package/dist/compat/compat.js +10 -11
- package/dist/compat/compat.mjs +10 -11
- package/dist/compat/index.d.mts +4 -3
- package/dist/compat/index.d.ts +4 -3
- package/dist/compat/index.js +10 -9
- package/dist/compat/index.mjs +10 -9
- package/dist/compat/math/inRange.d.mts +5 -2
- package/dist/compat/math/inRange.d.ts +5 -2
- package/dist/compat/math/inRange.js +14 -11
- package/dist/compat/math/inRange.mjs +14 -11
- package/dist/compat/math/maxBy.d.mts +1 -1
- package/dist/compat/math/maxBy.d.ts +1 -1
- package/dist/compat/math/maxBy.js +18 -4
- package/dist/compat/math/maxBy.mjs +18 -4
- package/dist/compat/math/minBy.d.mts +1 -1
- package/dist/compat/math/minBy.d.ts +1 -1
- package/dist/compat/math/minBy.js +18 -4
- package/dist/compat/math/minBy.mjs +18 -4
- package/dist/compat/object/assign.js +2 -3
- package/dist/compat/object/assign.mjs +2 -3
- package/dist/compat/object/assignIn.js +2 -3
- package/dist/compat/object/assignIn.mjs +2 -3
- package/dist/compat/object/assignInWith.js +2 -3
- package/dist/compat/object/assignInWith.mjs +2 -3
- package/dist/compat/object/assignWith.js +2 -3
- package/dist/compat/object/assignWith.mjs +2 -3
- package/dist/compat/object/create.js +1 -1
- package/dist/compat/object/create.mjs +1 -1
- package/dist/compat/object/defaults.js +2 -3
- package/dist/compat/object/defaults.mjs +2 -3
- package/dist/compat/object/has.js +1 -1
- package/dist/compat/object/has.mjs +1 -1
- package/dist/compat/object/hasIn.js +1 -1
- package/dist/compat/object/hasIn.mjs +1 -1
- package/dist/compat/object/unset.js +1 -1
- package/dist/compat/object/unset.mjs +1 -1
- package/dist/compat/object/values.js +5 -1
- package/dist/compat/object/values.mjs +5 -1
- package/dist/compat/predicate/isMatchWith.js +4 -5
- package/dist/compat/predicate/isMatchWith.mjs +4 -5
- package/dist/compat/string/camelCase.js +6 -2
- package/dist/compat/string/camelCase.mjs +6 -2
- package/dist/compat/string/kebabCase.js +2 -2
- package/dist/compat/string/kebabCase.mjs +2 -2
- package/dist/compat/string/lowerCase.js +2 -2
- package/dist/compat/string/lowerCase.mjs +2 -2
- package/dist/compat/string/pad.js +10 -3
- package/dist/compat/string/pad.mjs +10 -3
- package/dist/compat/string/padEnd.js +7 -1
- package/dist/compat/string/padEnd.mjs +7 -1
- package/dist/compat/string/padStart.js +7 -1
- package/dist/compat/string/padStart.mjs +7 -1
- package/dist/compat/string/snakeCase.js +2 -2
- package/dist/compat/string/snakeCase.mjs +2 -2
- package/dist/compat/string/startCase.js +1 -1
- package/dist/compat/string/startCase.mjs +1 -1
- package/dist/compat/string/template.d.mts +1 -1
- package/dist/compat/string/template.d.ts +1 -1
- package/dist/compat/string/templateSettings.d.mts +18 -1
- package/dist/compat/string/templateSettings.d.ts +18 -1
- package/dist/compat/string/templateSettings.js +4 -1
- package/dist/compat/string/templateSettings.mjs +5 -1
- package/dist/compat/string/truncate.js +2 -9
- package/dist/compat/string/truncate.mjs +1 -8
- package/dist/compat/string/upperCase.js +2 -2
- package/dist/compat/string/upperCase.mjs +2 -2
- package/dist/compat/util/eq.d.mts +17 -1
- package/dist/compat/util/eq.d.ts +17 -1
- package/dist/compat/util/eq.js +19 -1
- package/dist/compat/util/eq.mjs +19 -1
- package/dist/compat/util/toArray.js +2 -1
- package/dist/compat/util/toArray.mjs +2 -1
- package/dist/fp/flow.d.mts +213 -0
- package/dist/fp/flow.d.ts +213 -0
- package/dist/fp/flow.js +50 -0
- package/dist/fp/flow.mjs +50 -0
- package/dist/fp/index.d.mts +2 -1
- package/dist/fp/index.d.ts +2 -1
- package/dist/fp/index.js +3 -1
- package/dist/fp/index.mjs +3 -2
- package/dist/fp/pipe.js +8 -12
- package/dist/fp/pipe.mjs +8 -12
- package/dist/map/hasValue.js +2 -2
- package/dist/map/hasValue.mjs +2 -2
- package/dist/predicate/isEqualWith.js +2 -3
- package/dist/predicate/isEqualWith.mjs +2 -3
- package/dist/string/deburr.js +1 -1
- package/dist/string/deburr.mjs +1 -1
- package/dist/types/DeepPartial.d.mts +21 -0
- package/dist/types/DeepPartial.d.ts +21 -0
- package/dist/types/DeepReadonly.d.mts +22 -0
- package/dist/types/DeepReadonly.d.ts +22 -0
- package/dist/types/NonEmptyArray.d.mts +14 -0
- package/dist/types/NonEmptyArray.d.ts +14 -0
- package/dist/types/Simplify.d.mts +18 -0
- package/dist/types/Simplify.d.ts +18 -0
- package/dist/types/ValueOf.d.mts +14 -0
- package/dist/types/ValueOf.d.ts +14 -0
- package/dist/types/Writable.d.mts +15 -0
- package/dist/types/Writable.d.ts +15 -0
- package/dist/types/index.d.mts +7 -0
- package/dist/types/index.d.ts +7 -0
- package/package.json +23 -7
- package/types.d.ts +1 -0
- package/dist/_internal/isEqualsSameValueZero.d.mts +0 -17
- package/dist/_internal/isEqualsSameValueZero.d.ts +0 -17
- package/dist/_internal/isEqualsSameValueZero.js +0 -19
- package/dist/_internal/isEqualsSameValueZero.mjs +0 -19
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region src/_internal/isEqualsSameValueZero.ts
|
|
2
|
-
/**
|
|
3
|
-
* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
|
|
4
|
-
*
|
|
5
|
-
* @param {any} value - The value to compare.
|
|
6
|
-
* @param {any} other - The other value to compare.
|
|
7
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* eq(1, 1); // true
|
|
11
|
-
* eq(0, -0); // true
|
|
12
|
-
* eq(NaN, NaN); // true
|
|
13
|
-
* eq('a', Object('a')); // false
|
|
14
|
-
*/
|
|
15
|
-
function isEqualsSameValueZero(value, other) {
|
|
16
|
-
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
exports.isEqualsSameValueZero = isEqualsSameValueZero;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region src/_internal/isEqualsSameValueZero.ts
|
|
2
|
-
/**
|
|
3
|
-
* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
|
|
4
|
-
*
|
|
5
|
-
* @param {any} value - The value to compare.
|
|
6
|
-
* @param {any} other - The other value to compare.
|
|
7
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* eq(1, 1); // true
|
|
11
|
-
* eq(0, -0); // true
|
|
12
|
-
* eq(NaN, NaN); // true
|
|
13
|
-
* eq('a', Object('a')); // false
|
|
14
|
-
*/
|
|
15
|
-
function isEqualsSameValueZero(value, other) {
|
|
16
|
-
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { isEqualsSameValueZero };
|