es-toolkit 1.49.0-dev.1956 → 1.49.0-dev.1959
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/browser.global.js +2 -2
- package/dist/compat/_internal/assignValue.js +2 -3
- package/dist/compat/_internal/assignValue.mjs +2 -3
- package/dist/compat/_internal/isIterateeCall.js +2 -3
- package/dist/compat/_internal/isIterateeCall.mjs +2 -3
- package/dist/compat/array/includes.js +8 -3
- package/dist/compat/array/includes.mjs +8 -3
- package/dist/compat/array/intersectionWith.js +2 -3
- package/dist/compat/array/intersectionWith.mjs +2 -3
- package/dist/compat/array/pullAllWith.js +2 -3
- package/dist/compat/array/pullAllWith.mjs +2 -3
- 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 +4 -5
- package/dist/compat/compat.mjs +4 -5
- package/dist/compat/index.d.mts +4 -3
- package/dist/compat/index.d.ts +4 -3
- package/dist/compat/index.js +4 -3
- package/dist/compat/index.mjs +4 -3
- 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/defaults.js +2 -3
- package/dist/compat/object/defaults.mjs +2 -3
- package/dist/compat/predicate/isMatchWith.js +4 -5
- package/dist/compat/predicate/isMatchWith.mjs +4 -5
- 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/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/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/package.json +1 -1
- 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,5 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("../util/eq.js");
|
|
1
|
+
const require_eq = require("../util/eq.js");
|
|
3
2
|
const require_sortedLastIndex = require("./sortedLastIndex.js");
|
|
4
3
|
//#region src/compat/array/sortedLastIndexOf.ts
|
|
5
4
|
/**
|
|
@@ -37,7 +36,7 @@ const require_sortedLastIndex = require("./sortedLastIndex.js");
|
|
|
37
36
|
function sortedLastIndexOf(array, value) {
|
|
38
37
|
if (!array?.length) return -1;
|
|
39
38
|
const index = require_sortedLastIndex.sortedLastIndex(array, value) - 1;
|
|
40
|
-
if (index >= 0 &&
|
|
39
|
+
if (index >= 0 && require_eq.eq(array[index], value)) return index;
|
|
41
40
|
return -1;
|
|
42
41
|
}
|
|
43
42
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../util/eq.mjs";
|
|
1
|
+
import { eq } from "../util/eq.mjs";
|
|
3
2
|
import { sortedLastIndex } from "./sortedLastIndex.mjs";
|
|
4
3
|
//#region src/compat/array/sortedLastIndexOf.ts
|
|
5
4
|
/**
|
|
@@ -37,7 +36,7 @@ import { sortedLastIndex } from "./sortedLastIndex.mjs";
|
|
|
37
36
|
function sortedLastIndexOf(array, value) {
|
|
38
37
|
if (!array?.length) return -1;
|
|
39
38
|
const index = sortedLastIndex(array, value) - 1;
|
|
40
|
-
if (index >= 0 &&
|
|
39
|
+
if (index >= 0 && eq(array[index], value)) return index;
|
|
41
40
|
return -1;
|
|
42
41
|
}
|
|
43
42
|
//#endregion
|
package/dist/compat/compat.d.mts
CHANGED
|
@@ -246,7 +246,8 @@ import { snakeCase } from "./string/snakeCase.mjs";
|
|
|
246
246
|
import { split } from "./string/split.mjs";
|
|
247
247
|
import { startCase } from "./string/startCase.mjs";
|
|
248
248
|
import { startsWith } from "./string/startsWith.mjs";
|
|
249
|
-
import { template
|
|
249
|
+
import { template } from "./string/template.mjs";
|
|
250
|
+
import { templateSettings } from "./string/templateSettings.mjs";
|
|
250
251
|
import { toLower } from "./string/toLower.mjs";
|
|
251
252
|
import { toUpper } from "./string/toUpper.mjs";
|
|
252
253
|
import { trim } from "./string/trim.mjs";
|
|
@@ -260,7 +261,7 @@ import { words } from "./string/words.mjs";
|
|
|
260
261
|
import { cond } from "./util/cond.mjs";
|
|
261
262
|
import { constant } from "./util/constant.mjs";
|
|
262
263
|
import { defaultTo } from "./util/defaultTo.mjs";
|
|
263
|
-
import {
|
|
264
|
+
import { eq } from "./util/eq.mjs";
|
|
264
265
|
import { gt } from "./util/gt.mjs";
|
|
265
266
|
import { gte } from "./util/gte.mjs";
|
|
266
267
|
import { invoke } from "./util/invoke.mjs";
|
|
@@ -292,7 +293,7 @@ import { uniqueId } from "./util/uniqueId.mjs";
|
|
|
292
293
|
|
|
293
294
|
//#region src/compat/compat.d.ts
|
|
294
295
|
declare namespace compat_d_exports {
|
|
295
|
-
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith,
|
|
296
|
+
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
|
296
297
|
}
|
|
297
298
|
//#endregion
|
|
298
299
|
export { compat_d_exports };
|
package/dist/compat/compat.d.ts
CHANGED
|
@@ -246,7 +246,8 @@ import { snakeCase } from "./string/snakeCase.js";
|
|
|
246
246
|
import { split } from "./string/split.js";
|
|
247
247
|
import { startCase } from "./string/startCase.js";
|
|
248
248
|
import { startsWith } from "./string/startsWith.js";
|
|
249
|
-
import { template
|
|
249
|
+
import { template } from "./string/template.js";
|
|
250
|
+
import { templateSettings } from "./string/templateSettings.js";
|
|
250
251
|
import { toLower } from "./string/toLower.js";
|
|
251
252
|
import { toUpper } from "./string/toUpper.js";
|
|
252
253
|
import { trim } from "./string/trim.js";
|
|
@@ -260,7 +261,7 @@ import { words } from "./string/words.js";
|
|
|
260
261
|
import { cond } from "./util/cond.js";
|
|
261
262
|
import { constant } from "./util/constant.js";
|
|
262
263
|
import { defaultTo } from "./util/defaultTo.js";
|
|
263
|
-
import {
|
|
264
|
+
import { eq } from "./util/eq.js";
|
|
264
265
|
import { gt } from "./util/gt.js";
|
|
265
266
|
import { gte } from "./util/gte.js";
|
|
266
267
|
import { invoke } from "./util/invoke.js";
|
|
@@ -292,7 +293,7 @@ import { uniqueId } from "./util/uniqueId.js";
|
|
|
292
293
|
|
|
293
294
|
//#region src/compat/compat.d.ts
|
|
294
295
|
declare namespace compat_d_exports {
|
|
295
|
-
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith,
|
|
296
|
+
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
|
296
297
|
}
|
|
297
298
|
//#endregion
|
|
298
299
|
export { compat_d_exports };
|
package/dist/compat/compat.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.js");
|
|
2
2
|
const require_isArray = require("./predicate/isArray.js");
|
|
3
3
|
const require_isPlainObject = require("./predicate/isPlainObject.js");
|
|
4
|
-
const
|
|
5
|
-
require("./util/eq.js");
|
|
4
|
+
const require_eq = require("./util/eq.js");
|
|
6
5
|
const require_isEqual = require("../predicate/isEqual.js");
|
|
7
6
|
const require_castArray = require("./array/castArray.js");
|
|
8
7
|
const require_isArrayLike = require("./predicate/isArrayLike.js");
|
|
@@ -264,7 +263,7 @@ const require_split = require("./string/split.js");
|
|
|
264
263
|
const require_startCase = require("./string/startCase.js");
|
|
265
264
|
const require_startsWith = require("./string/startsWith.js");
|
|
266
265
|
const require_template = require("./string/template.js");
|
|
267
|
-
require("./string/templateSettings.js");
|
|
266
|
+
const require_templateSettings = require("./string/templateSettings.js");
|
|
268
267
|
const require_toLower = require("./string/toLower.js");
|
|
269
268
|
const require_toUpper = require("./string/toUpper.js");
|
|
270
269
|
const require_trim = require("./string/trim.js");
|
|
@@ -350,7 +349,7 @@ var compat_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
350
349
|
each: () => require_forEach.forEach,
|
|
351
350
|
eachRight: () => require_forEachRight.forEachRight,
|
|
352
351
|
endsWith: () => require_endsWith.endsWith,
|
|
353
|
-
eq: () =>
|
|
352
|
+
eq: () => require_eq.eq,
|
|
354
353
|
escape: () => require_escape.escape,
|
|
355
354
|
escapeRegExp: () => require_escapeRegExp.escapeRegExp,
|
|
356
355
|
every: () => require_every.every,
|
|
@@ -546,7 +545,7 @@ var compat_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
546
545
|
takeRightWhile: () => require_takeRightWhile.takeRightWhile,
|
|
547
546
|
takeWhile: () => require_takeWhile.takeWhile,
|
|
548
547
|
template: () => require_template.template,
|
|
549
|
-
templateSettings: () =>
|
|
548
|
+
templateSettings: () => require_templateSettings.templateSettings,
|
|
550
549
|
throttle: () => require_throttle.throttle,
|
|
551
550
|
times: () => require_times.times,
|
|
552
551
|
toArray: () => require_toArray.toArray,
|
package/dist/compat/compat.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { isArray } from "./predicate/isArray.mjs";
|
|
3
3
|
import { isPlainObject } from "./predicate/isPlainObject.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import "./util/eq.mjs";
|
|
4
|
+
import { eq } from "./util/eq.mjs";
|
|
6
5
|
import { isEqual } from "../predicate/isEqual.mjs";
|
|
7
6
|
import { castArray } from "./array/castArray.mjs";
|
|
8
7
|
import { isArrayLike } from "./predicate/isArrayLike.mjs";
|
|
@@ -263,8 +262,8 @@ import { snakeCase } from "./string/snakeCase.mjs";
|
|
|
263
262
|
import { split } from "./string/split.mjs";
|
|
264
263
|
import { startCase } from "./string/startCase.mjs";
|
|
265
264
|
import { startsWith } from "./string/startsWith.mjs";
|
|
266
|
-
import { template
|
|
267
|
-
import "./string/templateSettings.mjs";
|
|
265
|
+
import { template } from "./string/template.mjs";
|
|
266
|
+
import { templateSettings } from "./string/templateSettings.mjs";
|
|
268
267
|
import { toLower } from "./string/toLower.mjs";
|
|
269
268
|
import { toUpper } from "./string/toUpper.mjs";
|
|
270
269
|
import { trim } from "./string/trim.mjs";
|
|
@@ -350,7 +349,7 @@ var compat_exports = /* @__PURE__ */ __exportAll({
|
|
|
350
349
|
each: () => forEach,
|
|
351
350
|
eachRight: () => forEachRight,
|
|
352
351
|
endsWith: () => endsWith,
|
|
353
|
-
eq: () =>
|
|
352
|
+
eq: () => eq,
|
|
354
353
|
escape: () => escape,
|
|
355
354
|
escapeRegExp: () => escapeRegExp,
|
|
356
355
|
every: () => every,
|
package/dist/compat/index.d.mts
CHANGED
|
@@ -247,7 +247,8 @@ import { snakeCase } from "./string/snakeCase.mjs";
|
|
|
247
247
|
import { split } from "./string/split.mjs";
|
|
248
248
|
import { startCase } from "./string/startCase.mjs";
|
|
249
249
|
import { startsWith } from "./string/startsWith.mjs";
|
|
250
|
-
import { template
|
|
250
|
+
import { template } from "./string/template.mjs";
|
|
251
|
+
import { templateSettings } from "./string/templateSettings.mjs";
|
|
251
252
|
import { toLower } from "./string/toLower.mjs";
|
|
252
253
|
import { toUpper } from "./string/toUpper.mjs";
|
|
253
254
|
import { trim } from "./string/trim.mjs";
|
|
@@ -261,7 +262,7 @@ import { words } from "./string/words.mjs";
|
|
|
261
262
|
import { cond } from "./util/cond.mjs";
|
|
262
263
|
import { constant } from "./util/constant.mjs";
|
|
263
264
|
import { defaultTo } from "./util/defaultTo.mjs";
|
|
264
|
-
import {
|
|
265
|
+
import { eq } from "./util/eq.mjs";
|
|
265
266
|
import { gt } from "./util/gt.mjs";
|
|
266
267
|
import { gte } from "./util/gte.mjs";
|
|
267
268
|
import { invoke } from "./util/invoke.mjs";
|
|
@@ -290,4 +291,4 @@ import { toPlainObject } from "./util/toPlainObject.mjs";
|
|
|
290
291
|
import { toSafeInteger } from "./util/toSafeInteger.mjs";
|
|
291
292
|
import { toString } from "./util/toString.mjs";
|
|
292
293
|
import { uniqueId } from "./util/uniqueId.mjs";
|
|
293
|
-
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith,
|
|
294
|
+
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -247,7 +247,8 @@ import { snakeCase } from "./string/snakeCase.js";
|
|
|
247
247
|
import { split } from "./string/split.js";
|
|
248
248
|
import { startCase } from "./string/startCase.js";
|
|
249
249
|
import { startsWith } from "./string/startsWith.js";
|
|
250
|
-
import { template
|
|
250
|
+
import { template } from "./string/template.js";
|
|
251
|
+
import { templateSettings } from "./string/templateSettings.js";
|
|
251
252
|
import { toLower } from "./string/toLower.js";
|
|
252
253
|
import { toUpper } from "./string/toUpper.js";
|
|
253
254
|
import { trim } from "./string/trim.js";
|
|
@@ -261,7 +262,7 @@ import { words } from "./string/words.js";
|
|
|
261
262
|
import { cond } from "./util/cond.js";
|
|
262
263
|
import { constant } from "./util/constant.js";
|
|
263
264
|
import { defaultTo } from "./util/defaultTo.js";
|
|
264
|
-
import {
|
|
265
|
+
import { eq } from "./util/eq.js";
|
|
265
266
|
import { gt } from "./util/gt.js";
|
|
266
267
|
import { gte } from "./util/gte.js";
|
|
267
268
|
import { invoke } from "./util/invoke.js";
|
|
@@ -290,4 +291,4 @@ import { toPlainObject } from "./util/toPlainObject.js";
|
|
|
290
291
|
import { toSafeInteger } from "./util/toSafeInteger.js";
|
|
291
292
|
import { toString } from "./util/toString.js";
|
|
292
293
|
import { uniqueId } from "./util/uniqueId.js";
|
|
293
|
-
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith,
|
|
294
|
+
export { DebouncedFunc, add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
package/dist/compat/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
const require_isArray = require("./predicate/isArray.js");
|
|
6
6
|
const require_isPlainObject = require("./predicate/isPlainObject.js");
|
|
7
|
-
const
|
|
7
|
+
const require_eq = require("./util/eq.js");
|
|
8
8
|
const require_isEqual = require("../predicate/isEqual.js");
|
|
9
9
|
const require_castArray = require("./array/castArray.js");
|
|
10
10
|
const require_isArrayLike = require("./predicate/isArrayLike.js");
|
|
@@ -261,6 +261,7 @@ const require_split = require("./string/split.js");
|
|
|
261
261
|
const require_startCase = require("./string/startCase.js");
|
|
262
262
|
const require_startsWith = require("./string/startsWith.js");
|
|
263
263
|
const require_template = require("./string/template.js");
|
|
264
|
+
const require_templateSettings = require("./string/templateSettings.js");
|
|
264
265
|
const require_toLower = require("./string/toLower.js");
|
|
265
266
|
const require_toUpper = require("./string/toUpper.js");
|
|
266
267
|
const require_trim = require("./string/trim.js");
|
|
@@ -347,7 +348,7 @@ exports.dropWhile = require_dropWhile.dropWhile;
|
|
|
347
348
|
exports.each = require_forEach.forEach;
|
|
348
349
|
exports.eachRight = require_forEachRight.forEachRight;
|
|
349
350
|
exports.endsWith = require_endsWith.endsWith;
|
|
350
|
-
exports.eq =
|
|
351
|
+
exports.eq = require_eq.eq;
|
|
351
352
|
exports.escape = require_escape.escape;
|
|
352
353
|
exports.escapeRegExp = require_escapeRegExp.escapeRegExp;
|
|
353
354
|
exports.every = require_every.every;
|
|
@@ -543,7 +544,7 @@ exports.takeRight = require_takeRight.takeRight;
|
|
|
543
544
|
exports.takeRightWhile = require_takeRightWhile.takeRightWhile;
|
|
544
545
|
exports.takeWhile = require_takeWhile.takeWhile;
|
|
545
546
|
exports.template = require_template.template;
|
|
546
|
-
exports.templateSettings =
|
|
547
|
+
exports.templateSettings = require_templateSettings.templateSettings;
|
|
547
548
|
exports.throttle = require_throttle.throttle;
|
|
548
549
|
exports.times = require_times.times;
|
|
549
550
|
exports.toArray = require_toArray.toArray;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isArray } from "./predicate/isArray.mjs";
|
|
2
2
|
import { isPlainObject } from "./predicate/isPlainObject.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { eq } from "./util/eq.mjs";
|
|
4
4
|
import { isEqual } from "../predicate/isEqual.mjs";
|
|
5
5
|
import { castArray } from "./array/castArray.mjs";
|
|
6
6
|
import { isArrayLike } from "./predicate/isArrayLike.mjs";
|
|
@@ -256,7 +256,8 @@ import { snakeCase } from "./string/snakeCase.mjs";
|
|
|
256
256
|
import { split } from "./string/split.mjs";
|
|
257
257
|
import { startCase } from "./string/startCase.mjs";
|
|
258
258
|
import { startsWith } from "./string/startsWith.mjs";
|
|
259
|
-
import { template
|
|
259
|
+
import { template } from "./string/template.mjs";
|
|
260
|
+
import { templateSettings } from "./string/templateSettings.mjs";
|
|
260
261
|
import { toLower } from "./string/toLower.mjs";
|
|
261
262
|
import { toUpper } from "./string/toUpper.mjs";
|
|
262
263
|
import { trim } from "./string/trim.mjs";
|
|
@@ -291,4 +292,4 @@ import { toSafeInteger } from "./util/toSafeInteger.mjs";
|
|
|
291
292
|
import { uniqueId } from "./util/uniqueId.mjs";
|
|
292
293
|
import "./compat.mjs";
|
|
293
294
|
import { toolkit } from "./toolkit.mjs";
|
|
294
|
-
export { add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith,
|
|
295
|
+
export { add, after, ary, assign, assignIn, assignInWith, assignWith, at, attempt, before, bind, bindAll, bindKey, camelCase, capitalize, castArray, ceil, chunk, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, compact, concat, cond, conforms, conformsTo, constant, countBy, create, curry, curryRight, debounce, deburr, toolkit as default, defaultTo, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, divide, drop, dropRight, dropRightWhile, dropWhile, forEach as each, forEachRight as eachRight, endsWith, eq, escape, escapeRegExp, every, assignIn as extend, assignInWith as extendWith, fill, filter, find, findIndex, findKey, findLast, findLastIndex, findLastKey, head as first, flatMap, flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, floor, flow, flowRight, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, fromPairs, functions, functionsIn, get, groupBy, gt, gte, has, hasIn, head, identity, inRange, includes, indexOf, initial, intersection, intersectionBy, intersectionWith, invert, invertBy, invoke, invokeMap, isArguments, isArray, isArrayBuffer, isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, isSafeInteger, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, join, kebabCase, keyBy, keys, keysIn, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, map, mapKeys, mapValues, matches, matchesProperty, max, maxBy, mean, meanBy, memoize, merge, mergeWith, method, methodOf, min, minBy, multiply, negate, noop, now, nth, nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, pad, padEnd, padStart, parseInt, partial, partialRight, partition, pick, pickBy, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, random, range, rangeRight, rearg, reduce, reduceRight, reject, remove, repeat, replace, rest, result, reverse, round, sample, sampleSize, set, setWith, shuffle, size, slice, snakeCase, some, sortBy, sortedIndex, sortedIndexBy, sortedIndexOf, sortedLastIndex, sortedLastIndexBy, sortedLastIndexOf, split, spread, startCase, startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, template, templateSettings, throttle, times, toArray, toDefaulted, toFinite, toInteger, toLength, toLower, toNumber, toPairs, toPairsIn, toPath, toPlainObject, toSafeInteger, toString, toUpper, transform, trim, trimEnd, trimStart, truncate, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, uniqueId, unset, unzip, unzipWith, update, updateWith, upperCase, upperFirst, values, valuesIn, without, words, wrap, xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, zipWith };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("../util/eq.js");
|
|
1
|
+
const require_eq = require("../util/eq.js");
|
|
3
2
|
const require_keys = require("./keys.js");
|
|
4
3
|
//#region src/compat/object/assign.ts
|
|
5
4
|
/**
|
|
@@ -26,7 +25,7 @@ function assignImpl(object, source) {
|
|
|
26
25
|
const keys$1 = require_keys.keys(source);
|
|
27
26
|
for (let i = 0; i < keys$1.length; i++) {
|
|
28
27
|
const key = keys$1[i];
|
|
29
|
-
if (!(key in object) || !
|
|
28
|
+
if (!(key in object) || !require_eq.eq(object[key], source[key])) object[key] = source[key];
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../util/eq.mjs";
|
|
1
|
+
import { eq } from "../util/eq.mjs";
|
|
3
2
|
import { keys } from "./keys.mjs";
|
|
4
3
|
//#region src/compat/object/assign.ts
|
|
5
4
|
/**
|
|
@@ -26,7 +25,7 @@ function assignImpl(object, source) {
|
|
|
26
25
|
const keys$1 = keys(source);
|
|
27
26
|
for (let i = 0; i < keys$1.length; i++) {
|
|
28
27
|
const key = keys$1[i];
|
|
29
|
-
if (!(key in object) || !
|
|
28
|
+
if (!(key in object) || !eq(object[key], source[key])) object[key] = source[key];
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("../util/eq.js");
|
|
1
|
+
const require_eq = require("../util/eq.js");
|
|
3
2
|
const require_keysIn = require("./keysIn.js");
|
|
4
3
|
//#region src/compat/object/assignIn.ts
|
|
5
4
|
/**
|
|
@@ -26,7 +25,7 @@ function assignInImpl(object, source) {
|
|
|
26
25
|
const keys = require_keysIn.keysIn(source);
|
|
27
26
|
for (let i = 0; i < keys.length; i++) {
|
|
28
27
|
const key = keys[i];
|
|
29
|
-
if (!(key in object) || !
|
|
28
|
+
if (!(key in object) || !require_eq.eq(object[key], source[key])) object[key] = source[key];
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../util/eq.mjs";
|
|
1
|
+
import { eq } from "../util/eq.mjs";
|
|
3
2
|
import { keysIn } from "./keysIn.mjs";
|
|
4
3
|
//#region src/compat/object/assignIn.ts
|
|
5
4
|
/**
|
|
@@ -26,7 +25,7 @@ function assignInImpl(object, source) {
|
|
|
26
25
|
const keys = keysIn(source);
|
|
27
26
|
for (let i = 0; i < keys.length; i++) {
|
|
28
27
|
const key = keys[i];
|
|
29
|
-
if (!(key in object) || !
|
|
28
|
+
if (!(key in object) || !eq(object[key], source[key])) object[key] = source[key];
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("../util/eq.js");
|
|
1
|
+
const require_eq = require("../util/eq.js");
|
|
3
2
|
const require_keysIn = require("./keysIn.js");
|
|
4
3
|
//#region src/compat/object/assignInWith.ts
|
|
5
4
|
/**
|
|
@@ -41,7 +40,7 @@ function assignInWithImpl(object, source, getValueToAssign) {
|
|
|
41
40
|
const objValue = object[key];
|
|
42
41
|
const srcValue = source[key];
|
|
43
42
|
const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
|
|
44
|
-
if (!(key in object) || !
|
|
43
|
+
if (!(key in object) || !require_eq.eq(objValue, newValue)) object[key] = newValue;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../util/eq.mjs";
|
|
1
|
+
import { eq } from "../util/eq.mjs";
|
|
3
2
|
import { keysIn } from "./keysIn.mjs";
|
|
4
3
|
//#region src/compat/object/assignInWith.ts
|
|
5
4
|
/**
|
|
@@ -41,7 +40,7 @@ function assignInWithImpl(object, source, getValueToAssign) {
|
|
|
41
40
|
const objValue = object[key];
|
|
42
41
|
const srcValue = source[key];
|
|
43
42
|
const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
|
|
44
|
-
if (!(key in object) || !
|
|
43
|
+
if (!(key in object) || !eq(objValue, newValue)) object[key] = newValue;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("../util/eq.js");
|
|
1
|
+
const require_eq = require("../util/eq.js");
|
|
3
2
|
const require_keys = require("./keys.js");
|
|
4
3
|
//#region src/compat/object/assignWith.ts
|
|
5
4
|
/**
|
|
@@ -41,7 +40,7 @@ function assignWithImpl(object, source, getValueToAssign) {
|
|
|
41
40
|
const objValue = object[key];
|
|
42
41
|
const srcValue = source[key];
|
|
43
42
|
const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
|
|
44
|
-
if (!(key in object) || !
|
|
43
|
+
if (!(key in object) || !require_eq.eq(objValue, newValue)) object[key] = newValue;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../util/eq.mjs";
|
|
1
|
+
import { eq } from "../util/eq.mjs";
|
|
3
2
|
import { keys } from "./keys.mjs";
|
|
4
3
|
//#region src/compat/object/assignWith.ts
|
|
5
4
|
/**
|
|
@@ -41,7 +40,7 @@ function assignWithImpl(object, source, getValueToAssign) {
|
|
|
41
40
|
const objValue = object[key];
|
|
42
41
|
const srcValue = source[key];
|
|
43
42
|
const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
|
|
44
|
-
if (!(key in object) || !
|
|
43
|
+
if (!(key in object) || !eq(objValue, newValue)) object[key] = newValue;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
require("../util/eq.js");
|
|
1
|
+
const require_eq = require("../util/eq.js");
|
|
3
2
|
const require_isNil = require("../../predicate/isNil.js");
|
|
4
3
|
const require_isIterateeCall = require("../_internal/isIterateeCall.js");
|
|
5
4
|
//#region src/compat/object/defaults.ts
|
|
@@ -38,7 +37,7 @@ function defaults(object, ...sources) {
|
|
|
38
37
|
for (let j = 0; j < keys.length; j++) {
|
|
39
38
|
const key = keys[j];
|
|
40
39
|
const value = object[key];
|
|
41
|
-
if (value === void 0 || !Object.hasOwn(object, key) &&
|
|
40
|
+
if (value === void 0 || !Object.hasOwn(object, key) && require_eq.eq(value, objectProto[key])) object[key] = source[key];
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
return object;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../util/eq.mjs";
|
|
1
|
+
import { eq } from "../util/eq.mjs";
|
|
3
2
|
import { isNil } from "../../predicate/isNil.mjs";
|
|
4
3
|
import { isIterateeCall } from "../_internal/isIterateeCall.mjs";
|
|
5
4
|
//#region src/compat/object/defaults.ts
|
|
@@ -38,7 +37,7 @@ function defaults(object, ...sources) {
|
|
|
38
37
|
for (let j = 0; j < keys.length; j++) {
|
|
39
38
|
const key = keys[j];
|
|
40
39
|
const value = object[key];
|
|
41
|
-
if (value === void 0 || !Object.hasOwn(object, key) &&
|
|
40
|
+
if (value === void 0 || !Object.hasOwn(object, key) && eq(value, objectProto[key])) object[key] = source[key];
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
return object;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_isPrimitive = require("../../predicate/isPrimitive.js");
|
|
2
|
-
const
|
|
3
|
-
require("../util/eq.js");
|
|
2
|
+
const require_eq = require("../util/eq.js");
|
|
4
3
|
const require_isObject = require("./isObject.js");
|
|
5
4
|
//#region src/compat/predicate/isMatchWith.ts
|
|
6
5
|
/**
|
|
@@ -86,14 +85,14 @@ function isMatchWithInternal(target, source, compare, stack, isRoot = false) {
|
|
|
86
85
|
case "object": return isObjectMatch(target, source, compare, stack);
|
|
87
86
|
case "function":
|
|
88
87
|
if (Object.keys(source).length > 0) return isMatchWithInternal(target, { ...source }, compare, stack, isRoot);
|
|
89
|
-
return
|
|
88
|
+
return require_eq.eq(target, source);
|
|
90
89
|
default:
|
|
91
|
-
if (!require_isObject.isObject(target)) return
|
|
90
|
+
if (!require_isObject.isObject(target)) return require_eq.eq(target, source);
|
|
92
91
|
if (isRoot) {
|
|
93
92
|
if (typeof source === "string") return source === "";
|
|
94
93
|
return true;
|
|
95
94
|
}
|
|
96
|
-
return
|
|
95
|
+
return require_eq.eq(target, source);
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
function isObjectMatch(target, source, compare, stack) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isPrimitive } from "../../predicate/isPrimitive.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "../util/eq.mjs";
|
|
2
|
+
import { eq } from "../util/eq.mjs";
|
|
4
3
|
import { isObject } from "./isObject.mjs";
|
|
5
4
|
//#region src/compat/predicate/isMatchWith.ts
|
|
6
5
|
/**
|
|
@@ -86,14 +85,14 @@ function isMatchWithInternal(target, source, compare, stack, isRoot = false) {
|
|
|
86
85
|
case "object": return isObjectMatch(target, source, compare, stack);
|
|
87
86
|
case "function":
|
|
88
87
|
if (Object.keys(source).length > 0) return isMatchWithInternal(target, { ...source }, compare, stack, isRoot);
|
|
89
|
-
return
|
|
88
|
+
return eq(target, source);
|
|
90
89
|
default:
|
|
91
|
-
if (!isObject(target)) return
|
|
90
|
+
if (!isObject(target)) return eq(target, source);
|
|
92
91
|
if (isRoot) {
|
|
93
92
|
if (typeof source === "string") return source === "";
|
|
94
93
|
return true;
|
|
95
94
|
}
|
|
96
|
-
return
|
|
95
|
+
return eq(target, source);
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
function isObjectMatch(target, source, compare, stack) {
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { escape } from "./escape.mjs";
|
|
2
|
+
import { template } from "./template.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/compat/string/templateSettings.d.ts
|
|
5
|
+
declare const templateSettings: {
|
|
6
|
+
escape: RegExp;
|
|
7
|
+
evaluate: RegExp;
|
|
8
|
+
interpolate: RegExp;
|
|
9
|
+
variable: string;
|
|
10
|
+
imports: {
|
|
11
|
+
_: {
|
|
12
|
+
escape: typeof escape;
|
|
13
|
+
template: typeof template;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { templateSettings };
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { escape } from "./escape.js";
|
|
2
|
+
import { template } from "./template.js";
|
|
3
|
+
|
|
4
|
+
//#region src/compat/string/templateSettings.d.ts
|
|
5
|
+
declare const templateSettings: {
|
|
6
|
+
escape: RegExp;
|
|
7
|
+
evaluate: RegExp;
|
|
8
|
+
interpolate: RegExp;
|
|
9
|
+
variable: string;
|
|
10
|
+
imports: {
|
|
11
|
+
_: {
|
|
12
|
+
escape: typeof escape;
|
|
13
|
+
template: typeof template;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { templateSettings };
|