@hybridly/vite 0.10.0-beta.13 → 0.10.0-beta.15

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.
@@ -1,1410 +0,0 @@
1
- import { t as __commonJSMin } from "../rolldown-runtime.mjs";
2
- //#region ../../node_modules/lodash.clonedeep/index.js
3
- var require_lodash_clonedeep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- /**
5
- * lodash (Custom Build) <https://lodash.com/>
6
- * Build: `lodash modularize exports="npm" -o ./`
7
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
8
- * Released under MIT license <https://lodash.com/license>
9
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
10
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
11
- */
12
- /** Used as the size to enable large array optimizations. */
13
- var LARGE_ARRAY_SIZE = 200;
14
- /** Used to stand-in for `undefined` hash values. */
15
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
16
- /** Used as references for various `Number` constants. */
17
- var MAX_SAFE_INTEGER = 9007199254740991;
18
- /** `Object#toString` result references. */
19
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", promiseTag = "[object Promise]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
20
- var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
21
- /**
22
- * Used to match `RegExp`
23
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
24
- */
25
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
26
- /** Used to match `RegExp` flags from their coerced string values. */
27
- var reFlags = /\w*$/;
28
- /** Used to detect host constructors (Safari). */
29
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
30
- /** Used to detect unsigned integer values. */
31
- var reIsUint = /^(?:0|[1-9]\d*)$/;
32
- /** Used to identify `toStringTag` values supported by `_.clone`. */
33
- var cloneableTags = {};
34
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
35
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
36
- /** Detect free variable `global` from Node.js. */
37
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
38
- /** Detect free variable `self`. */
39
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
40
- /** Used as a reference to the global object. */
41
- var root = freeGlobal || freeSelf || Function("return this")();
42
- /** Detect free variable `exports`. */
43
- var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
44
- /** Detect free variable `module`. */
45
- var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
46
- /** Detect the popular CommonJS extension `module.exports`. */
47
- var moduleExports = freeModule && freeModule.exports === freeExports;
48
- /**
49
- * Adds the key-value `pair` to `map`.
50
- *
51
- * @private
52
- * @param {Object} map The map to modify.
53
- * @param {Array} pair The key-value pair to add.
54
- * @returns {Object} Returns `map`.
55
- */
56
- function addMapEntry(map, pair) {
57
- map.set(pair[0], pair[1]);
58
- return map;
59
- }
60
- /**
61
- * Adds `value` to `set`.
62
- *
63
- * @private
64
- * @param {Object} set The set to modify.
65
- * @param {*} value The value to add.
66
- * @returns {Object} Returns `set`.
67
- */
68
- function addSetEntry(set, value) {
69
- set.add(value);
70
- return set;
71
- }
72
- /**
73
- * A specialized version of `_.forEach` for arrays without support for
74
- * iteratee shorthands.
75
- *
76
- * @private
77
- * @param {Array} [array] The array to iterate over.
78
- * @param {Function} iteratee The function invoked per iteration.
79
- * @returns {Array} Returns `array`.
80
- */
81
- function arrayEach(array, iteratee) {
82
- var index = -1, length = array ? array.length : 0;
83
- while (++index < length) if (iteratee(array[index], index, array) === false) break;
84
- return array;
85
- }
86
- /**
87
- * Appends the elements of `values` to `array`.
88
- *
89
- * @private
90
- * @param {Array} array The array to modify.
91
- * @param {Array} values The values to append.
92
- * @returns {Array} Returns `array`.
93
- */
94
- function arrayPush(array, values) {
95
- var index = -1, length = values.length, offset = array.length;
96
- while (++index < length) array[offset + index] = values[index];
97
- return array;
98
- }
99
- /**
100
- * A specialized version of `_.reduce` for arrays without support for
101
- * iteratee shorthands.
102
- *
103
- * @private
104
- * @param {Array} [array] The array to iterate over.
105
- * @param {Function} iteratee The function invoked per iteration.
106
- * @param {*} [accumulator] The initial value.
107
- * @param {boolean} [initAccum] Specify using the first element of `array` as
108
- * the initial value.
109
- * @returns {*} Returns the accumulated value.
110
- */
111
- function arrayReduce(array, iteratee, accumulator, initAccum) {
112
- var index = -1, length = array ? array.length : 0;
113
- if (initAccum && length) accumulator = array[++index];
114
- while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
115
- return accumulator;
116
- }
117
- /**
118
- * The base implementation of `_.times` without support for iteratee shorthands
119
- * or max array length checks.
120
- *
121
- * @private
122
- * @param {number} n The number of times to invoke `iteratee`.
123
- * @param {Function} iteratee The function invoked per iteration.
124
- * @returns {Array} Returns the array of results.
125
- */
126
- function baseTimes(n, iteratee) {
127
- var index = -1, result = Array(n);
128
- while (++index < n) result[index] = iteratee(index);
129
- return result;
130
- }
131
- /**
132
- * Gets the value at `key` of `object`.
133
- *
134
- * @private
135
- * @param {Object} [object] The object to query.
136
- * @param {string} key The key of the property to get.
137
- * @returns {*} Returns the property value.
138
- */
139
- function getValue(object, key) {
140
- return object == null ? void 0 : object[key];
141
- }
142
- /**
143
- * Checks if `value` is a host object in IE < 9.
144
- *
145
- * @private
146
- * @param {*} value The value to check.
147
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
148
- */
149
- function isHostObject(value) {
150
- var result = false;
151
- if (value != null && typeof value.toString != "function") try {
152
- result = !!(value + "");
153
- } catch (e) {}
154
- return result;
155
- }
156
- /**
157
- * Converts `map` to its key-value pairs.
158
- *
159
- * @private
160
- * @param {Object} map The map to convert.
161
- * @returns {Array} Returns the key-value pairs.
162
- */
163
- function mapToArray(map) {
164
- var index = -1, result = Array(map.size);
165
- map.forEach(function(value, key) {
166
- result[++index] = [key, value];
167
- });
168
- return result;
169
- }
170
- /**
171
- * Creates a unary function that invokes `func` with its argument transformed.
172
- *
173
- * @private
174
- * @param {Function} func The function to wrap.
175
- * @param {Function} transform The argument transform.
176
- * @returns {Function} Returns the new function.
177
- */
178
- function overArg(func, transform) {
179
- return function(arg) {
180
- return func(transform(arg));
181
- };
182
- }
183
- /**
184
- * Converts `set` to an array of its values.
185
- *
186
- * @private
187
- * @param {Object} set The set to convert.
188
- * @returns {Array} Returns the values.
189
- */
190
- function setToArray(set) {
191
- var index = -1, result = Array(set.size);
192
- set.forEach(function(value) {
193
- result[++index] = value;
194
- });
195
- return result;
196
- }
197
- /** Used for built-in method references. */
198
- var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
199
- /** Used to detect overreaching core-js shims. */
200
- var coreJsData = root["__core-js_shared__"];
201
- /** Used to detect methods masquerading as native. */
202
- var maskSrcKey = function() {
203
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
204
- return uid ? "Symbol(src)_1." + uid : "";
205
- }();
206
- /** Used to resolve the decompiled source of functions. */
207
- var funcToString = funcProto.toString;
208
- /** Used to check objects for own properties. */
209
- var hasOwnProperty = objectProto.hasOwnProperty;
210
- /**
211
- * Used to resolve the
212
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
213
- * of values.
214
- */
215
- var objectToString = objectProto.toString;
216
- /** Used to detect if a method is native. */
217
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
218
- /** Built-in value references. */
219
- var Buffer = moduleExports ? root.Buffer : void 0, Symbol = root.Symbol, Uint8Array = root.Uint8Array, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice;
220
- var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
221
- var DataView = getNative(root, "DataView"), Map = getNative(root, "Map"), Promise = getNative(root, "Promise"), Set = getNative(root, "Set"), WeakMap = getNative(root, "WeakMap"), nativeCreate = getNative(Object, "create");
222
- /** Used to detect maps, sets, and weakmaps. */
223
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
224
- /** Used to convert symbols to primitives and strings. */
225
- var symbolProto = Symbol ? Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
226
- /**
227
- * Creates a hash object.
228
- *
229
- * @private
230
- * @constructor
231
- * @param {Array} [entries] The key-value pairs to cache.
232
- */
233
- function Hash(entries) {
234
- var index = -1, length = entries ? entries.length : 0;
235
- this.clear();
236
- while (++index < length) {
237
- var entry = entries[index];
238
- this.set(entry[0], entry[1]);
239
- }
240
- }
241
- /**
242
- * Removes all key-value entries from the hash.
243
- *
244
- * @private
245
- * @name clear
246
- * @memberOf Hash
247
- */
248
- function hashClear() {
249
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
250
- }
251
- /**
252
- * Removes `key` and its value from the hash.
253
- *
254
- * @private
255
- * @name delete
256
- * @memberOf Hash
257
- * @param {Object} hash The hash to modify.
258
- * @param {string} key The key of the value to remove.
259
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
260
- */
261
- function hashDelete(key) {
262
- return this.has(key) && delete this.__data__[key];
263
- }
264
- /**
265
- * Gets the hash value for `key`.
266
- *
267
- * @private
268
- * @name get
269
- * @memberOf Hash
270
- * @param {string} key The key of the value to get.
271
- * @returns {*} Returns the entry value.
272
- */
273
- function hashGet(key) {
274
- var data = this.__data__;
275
- if (nativeCreate) {
276
- var result = data[key];
277
- return result === HASH_UNDEFINED ? void 0 : result;
278
- }
279
- return hasOwnProperty.call(data, key) ? data[key] : void 0;
280
- }
281
- /**
282
- * Checks if a hash value for `key` exists.
283
- *
284
- * @private
285
- * @name has
286
- * @memberOf Hash
287
- * @param {string} key The key of the entry to check.
288
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
289
- */
290
- function hashHas(key) {
291
- var data = this.__data__;
292
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
293
- }
294
- /**
295
- * Sets the hash `key` to `value`.
296
- *
297
- * @private
298
- * @name set
299
- * @memberOf Hash
300
- * @param {string} key The key of the value to set.
301
- * @param {*} value The value to set.
302
- * @returns {Object} Returns the hash instance.
303
- */
304
- function hashSet(key, value) {
305
- var data = this.__data__;
306
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
307
- return this;
308
- }
309
- Hash.prototype.clear = hashClear;
310
- Hash.prototype["delete"] = hashDelete;
311
- Hash.prototype.get = hashGet;
312
- Hash.prototype.has = hashHas;
313
- Hash.prototype.set = hashSet;
314
- /**
315
- * Creates an list cache object.
316
- *
317
- * @private
318
- * @constructor
319
- * @param {Array} [entries] The key-value pairs to cache.
320
- */
321
- function ListCache(entries) {
322
- var index = -1, length = entries ? entries.length : 0;
323
- this.clear();
324
- while (++index < length) {
325
- var entry = entries[index];
326
- this.set(entry[0], entry[1]);
327
- }
328
- }
329
- /**
330
- * Removes all key-value entries from the list cache.
331
- *
332
- * @private
333
- * @name clear
334
- * @memberOf ListCache
335
- */
336
- function listCacheClear() {
337
- this.__data__ = [];
338
- }
339
- /**
340
- * Removes `key` and its value from the list cache.
341
- *
342
- * @private
343
- * @name delete
344
- * @memberOf ListCache
345
- * @param {string} key The key of the value to remove.
346
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
347
- */
348
- function listCacheDelete(key) {
349
- var data = this.__data__, index = assocIndexOf(data, key);
350
- if (index < 0) return false;
351
- if (index == data.length - 1) data.pop();
352
- else splice.call(data, index, 1);
353
- return true;
354
- }
355
- /**
356
- * Gets the list cache value for `key`.
357
- *
358
- * @private
359
- * @name get
360
- * @memberOf ListCache
361
- * @param {string} key The key of the value to get.
362
- * @returns {*} Returns the entry value.
363
- */
364
- function listCacheGet(key) {
365
- var data = this.__data__, index = assocIndexOf(data, key);
366
- return index < 0 ? void 0 : data[index][1];
367
- }
368
- /**
369
- * Checks if a list cache value for `key` exists.
370
- *
371
- * @private
372
- * @name has
373
- * @memberOf ListCache
374
- * @param {string} key The key of the entry to check.
375
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
376
- */
377
- function listCacheHas(key) {
378
- return assocIndexOf(this.__data__, key) > -1;
379
- }
380
- /**
381
- * Sets the list cache `key` to `value`.
382
- *
383
- * @private
384
- * @name set
385
- * @memberOf ListCache
386
- * @param {string} key The key of the value to set.
387
- * @param {*} value The value to set.
388
- * @returns {Object} Returns the list cache instance.
389
- */
390
- function listCacheSet(key, value) {
391
- var data = this.__data__, index = assocIndexOf(data, key);
392
- if (index < 0) data.push([key, value]);
393
- else data[index][1] = value;
394
- return this;
395
- }
396
- ListCache.prototype.clear = listCacheClear;
397
- ListCache.prototype["delete"] = listCacheDelete;
398
- ListCache.prototype.get = listCacheGet;
399
- ListCache.prototype.has = listCacheHas;
400
- ListCache.prototype.set = listCacheSet;
401
- /**
402
- * Creates a map cache object to store key-value pairs.
403
- *
404
- * @private
405
- * @constructor
406
- * @param {Array} [entries] The key-value pairs to cache.
407
- */
408
- function MapCache(entries) {
409
- var index = -1, length = entries ? entries.length : 0;
410
- this.clear();
411
- while (++index < length) {
412
- var entry = entries[index];
413
- this.set(entry[0], entry[1]);
414
- }
415
- }
416
- /**
417
- * Removes all key-value entries from the map.
418
- *
419
- * @private
420
- * @name clear
421
- * @memberOf MapCache
422
- */
423
- function mapCacheClear() {
424
- this.__data__ = {
425
- "hash": new Hash(),
426
- "map": new (Map || ListCache)(),
427
- "string": new Hash()
428
- };
429
- }
430
- /**
431
- * Removes `key` and its value from the map.
432
- *
433
- * @private
434
- * @name delete
435
- * @memberOf MapCache
436
- * @param {string} key The key of the value to remove.
437
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
438
- */
439
- function mapCacheDelete(key) {
440
- return getMapData(this, key)["delete"](key);
441
- }
442
- /**
443
- * Gets the map value for `key`.
444
- *
445
- * @private
446
- * @name get
447
- * @memberOf MapCache
448
- * @param {string} key The key of the value to get.
449
- * @returns {*} Returns the entry value.
450
- */
451
- function mapCacheGet(key) {
452
- return getMapData(this, key).get(key);
453
- }
454
- /**
455
- * Checks if a map value for `key` exists.
456
- *
457
- * @private
458
- * @name has
459
- * @memberOf MapCache
460
- * @param {string} key The key of the entry to check.
461
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
462
- */
463
- function mapCacheHas(key) {
464
- return getMapData(this, key).has(key);
465
- }
466
- /**
467
- * Sets the map `key` to `value`.
468
- *
469
- * @private
470
- * @name set
471
- * @memberOf MapCache
472
- * @param {string} key The key of the value to set.
473
- * @param {*} value The value to set.
474
- * @returns {Object} Returns the map cache instance.
475
- */
476
- function mapCacheSet(key, value) {
477
- getMapData(this, key).set(key, value);
478
- return this;
479
- }
480
- MapCache.prototype.clear = mapCacheClear;
481
- MapCache.prototype["delete"] = mapCacheDelete;
482
- MapCache.prototype.get = mapCacheGet;
483
- MapCache.prototype.has = mapCacheHas;
484
- MapCache.prototype.set = mapCacheSet;
485
- /**
486
- * Creates a stack cache object to store key-value pairs.
487
- *
488
- * @private
489
- * @constructor
490
- * @param {Array} [entries] The key-value pairs to cache.
491
- */
492
- function Stack(entries) {
493
- this.__data__ = new ListCache(entries);
494
- }
495
- /**
496
- * Removes all key-value entries from the stack.
497
- *
498
- * @private
499
- * @name clear
500
- * @memberOf Stack
501
- */
502
- function stackClear() {
503
- this.__data__ = new ListCache();
504
- }
505
- /**
506
- * Removes `key` and its value from the stack.
507
- *
508
- * @private
509
- * @name delete
510
- * @memberOf Stack
511
- * @param {string} key The key of the value to remove.
512
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
513
- */
514
- function stackDelete(key) {
515
- return this.__data__["delete"](key);
516
- }
517
- /**
518
- * Gets the stack value for `key`.
519
- *
520
- * @private
521
- * @name get
522
- * @memberOf Stack
523
- * @param {string} key The key of the value to get.
524
- * @returns {*} Returns the entry value.
525
- */
526
- function stackGet(key) {
527
- return this.__data__.get(key);
528
- }
529
- /**
530
- * Checks if a stack value for `key` exists.
531
- *
532
- * @private
533
- * @name has
534
- * @memberOf Stack
535
- * @param {string} key The key of the entry to check.
536
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
537
- */
538
- function stackHas(key) {
539
- return this.__data__.has(key);
540
- }
541
- /**
542
- * Sets the stack `key` to `value`.
543
- *
544
- * @private
545
- * @name set
546
- * @memberOf Stack
547
- * @param {string} key The key of the value to set.
548
- * @param {*} value The value to set.
549
- * @returns {Object} Returns the stack cache instance.
550
- */
551
- function stackSet(key, value) {
552
- var cache = this.__data__;
553
- if (cache instanceof ListCache) {
554
- var pairs = cache.__data__;
555
- if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
556
- pairs.push([key, value]);
557
- return this;
558
- }
559
- cache = this.__data__ = new MapCache(pairs);
560
- }
561
- cache.set(key, value);
562
- return this;
563
- }
564
- Stack.prototype.clear = stackClear;
565
- Stack.prototype["delete"] = stackDelete;
566
- Stack.prototype.get = stackGet;
567
- Stack.prototype.has = stackHas;
568
- Stack.prototype.set = stackSet;
569
- /**
570
- * Creates an array of the enumerable property names of the array-like `value`.
571
- *
572
- * @private
573
- * @param {*} value The value to query.
574
- * @param {boolean} inherited Specify returning inherited property names.
575
- * @returns {Array} Returns the array of property names.
576
- */
577
- function arrayLikeKeys(value, inherited) {
578
- var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
579
- var length = result.length, skipIndexes = !!length;
580
- for (var key in value) if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) result.push(key);
581
- return result;
582
- }
583
- /**
584
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
585
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
586
- * for equality comparisons.
587
- *
588
- * @private
589
- * @param {Object} object The object to modify.
590
- * @param {string} key The key of the property to assign.
591
- * @param {*} value The value to assign.
592
- */
593
- function assignValue(object, key, value) {
594
- var objValue = object[key];
595
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
596
- }
597
- /**
598
- * Gets the index at which the `key` is found in `array` of key-value pairs.
599
- *
600
- * @private
601
- * @param {Array} array The array to inspect.
602
- * @param {*} key The key to search for.
603
- * @returns {number} Returns the index of the matched value, else `-1`.
604
- */
605
- function assocIndexOf(array, key) {
606
- var length = array.length;
607
- while (length--) if (eq(array[length][0], key)) return length;
608
- return -1;
609
- }
610
- /**
611
- * The base implementation of `_.assign` without support for multiple sources
612
- * or `customizer` functions.
613
- *
614
- * @private
615
- * @param {Object} object The destination object.
616
- * @param {Object} source The source object.
617
- * @returns {Object} Returns `object`.
618
- */
619
- function baseAssign(object, source) {
620
- return object && copyObject(source, keys(source), object);
621
- }
622
- /**
623
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
624
- * traversed objects.
625
- *
626
- * @private
627
- * @param {*} value The value to clone.
628
- * @param {boolean} [isDeep] Specify a deep clone.
629
- * @param {boolean} [isFull] Specify a clone including symbols.
630
- * @param {Function} [customizer] The function to customize cloning.
631
- * @param {string} [key] The key of `value`.
632
- * @param {Object} [object] The parent object of `value`.
633
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
634
- * @returns {*} Returns the cloned value.
635
- */
636
- function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
637
- var result;
638
- if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
639
- if (result !== void 0) return result;
640
- if (!isObject(value)) return value;
641
- var isArr = isArray(value);
642
- if (isArr) {
643
- result = initCloneArray(value);
644
- if (!isDeep) return copyArray(value, result);
645
- } else {
646
- var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
647
- if (isBuffer(value)) return cloneBuffer(value, isDeep);
648
- if (tag == objectTag || tag == argsTag || isFunc && !object) {
649
- if (isHostObject(value)) return object ? value : {};
650
- result = initCloneObject(isFunc ? {} : value);
651
- if (!isDeep) return copySymbols(value, baseAssign(result, value));
652
- } else {
653
- if (!cloneableTags[tag]) return object ? value : {};
654
- result = initCloneByTag(value, tag, baseClone, isDeep);
655
- }
656
- }
657
- stack || (stack = new Stack());
658
- var stacked = stack.get(value);
659
- if (stacked) return stacked;
660
- stack.set(value, result);
661
- if (!isArr) var props = isFull ? getAllKeys(value) : keys(value);
662
- arrayEach(props || value, function(subValue, key) {
663
- if (props) {
664
- key = subValue;
665
- subValue = value[key];
666
- }
667
- assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
668
- });
669
- return result;
670
- }
671
- /**
672
- * The base implementation of `_.create` without support for assigning
673
- * properties to the created object.
674
- *
675
- * @private
676
- * @param {Object} prototype The object to inherit from.
677
- * @returns {Object} Returns the new object.
678
- */
679
- function baseCreate(proto) {
680
- return isObject(proto) ? objectCreate(proto) : {};
681
- }
682
- /**
683
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
684
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
685
- * symbols of `object`.
686
- *
687
- * @private
688
- * @param {Object} object The object to query.
689
- * @param {Function} keysFunc The function to get the keys of `object`.
690
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
691
- * @returns {Array} Returns the array of property names and symbols.
692
- */
693
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
694
- var result = keysFunc(object);
695
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
696
- }
697
- /**
698
- * The base implementation of `getTag`.
699
- *
700
- * @private
701
- * @param {*} value The value to query.
702
- * @returns {string} Returns the `toStringTag`.
703
- */
704
- function baseGetTag(value) {
705
- return objectToString.call(value);
706
- }
707
- /**
708
- * The base implementation of `_.isNative` without bad shim checks.
709
- *
710
- * @private
711
- * @param {*} value The value to check.
712
- * @returns {boolean} Returns `true` if `value` is a native function,
713
- * else `false`.
714
- */
715
- function baseIsNative(value) {
716
- if (!isObject(value) || isMasked(value)) return false;
717
- return (isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor).test(toSource(value));
718
- }
719
- /**
720
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
721
- *
722
- * @private
723
- * @param {Object} object The object to query.
724
- * @returns {Array} Returns the array of property names.
725
- */
726
- function baseKeys(object) {
727
- if (!isPrototype(object)) return nativeKeys(object);
728
- var result = [];
729
- for (var key in Object(object)) if (hasOwnProperty.call(object, key) && key != "constructor") result.push(key);
730
- return result;
731
- }
732
- /**
733
- * Creates a clone of `buffer`.
734
- *
735
- * @private
736
- * @param {Buffer} buffer The buffer to clone.
737
- * @param {boolean} [isDeep] Specify a deep clone.
738
- * @returns {Buffer} Returns the cloned buffer.
739
- */
740
- function cloneBuffer(buffer, isDeep) {
741
- if (isDeep) return buffer.slice();
742
- var result = new buffer.constructor(buffer.length);
743
- buffer.copy(result);
744
- return result;
745
- }
746
- /**
747
- * Creates a clone of `arrayBuffer`.
748
- *
749
- * @private
750
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
751
- * @returns {ArrayBuffer} Returns the cloned array buffer.
752
- */
753
- function cloneArrayBuffer(arrayBuffer) {
754
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
755
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
756
- return result;
757
- }
758
- /**
759
- * Creates a clone of `dataView`.
760
- *
761
- * @private
762
- * @param {Object} dataView The data view to clone.
763
- * @param {boolean} [isDeep] Specify a deep clone.
764
- * @returns {Object} Returns the cloned data view.
765
- */
766
- function cloneDataView(dataView, isDeep) {
767
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
768
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
769
- }
770
- /**
771
- * Creates a clone of `map`.
772
- *
773
- * @private
774
- * @param {Object} map The map to clone.
775
- * @param {Function} cloneFunc The function to clone values.
776
- * @param {boolean} [isDeep] Specify a deep clone.
777
- * @returns {Object} Returns the cloned map.
778
- */
779
- function cloneMap(map, isDeep, cloneFunc) {
780
- return arrayReduce(isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map), addMapEntry, new map.constructor());
781
- }
782
- /**
783
- * Creates a clone of `regexp`.
784
- *
785
- * @private
786
- * @param {Object} regexp The regexp to clone.
787
- * @returns {Object} Returns the cloned regexp.
788
- */
789
- function cloneRegExp(regexp) {
790
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
791
- result.lastIndex = regexp.lastIndex;
792
- return result;
793
- }
794
- /**
795
- * Creates a clone of `set`.
796
- *
797
- * @private
798
- * @param {Object} set The set to clone.
799
- * @param {Function} cloneFunc The function to clone values.
800
- * @param {boolean} [isDeep] Specify a deep clone.
801
- * @returns {Object} Returns the cloned set.
802
- */
803
- function cloneSet(set, isDeep, cloneFunc) {
804
- return arrayReduce(isDeep ? cloneFunc(setToArray(set), true) : setToArray(set), addSetEntry, new set.constructor());
805
- }
806
- /**
807
- * Creates a clone of the `symbol` object.
808
- *
809
- * @private
810
- * @param {Object} symbol The symbol object to clone.
811
- * @returns {Object} Returns the cloned symbol object.
812
- */
813
- function cloneSymbol(symbol) {
814
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
815
- }
816
- /**
817
- * Creates a clone of `typedArray`.
818
- *
819
- * @private
820
- * @param {Object} typedArray The typed array to clone.
821
- * @param {boolean} [isDeep] Specify a deep clone.
822
- * @returns {Object} Returns the cloned typed array.
823
- */
824
- function cloneTypedArray(typedArray, isDeep) {
825
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
826
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
827
- }
828
- /**
829
- * Copies the values of `source` to `array`.
830
- *
831
- * @private
832
- * @param {Array} source The array to copy values from.
833
- * @param {Array} [array=[]] The array to copy values to.
834
- * @returns {Array} Returns `array`.
835
- */
836
- function copyArray(source, array) {
837
- var index = -1, length = source.length;
838
- array || (array = Array(length));
839
- while (++index < length) array[index] = source[index];
840
- return array;
841
- }
842
- /**
843
- * Copies properties of `source` to `object`.
844
- *
845
- * @private
846
- * @param {Object} source The object to copy properties from.
847
- * @param {Array} props The property identifiers to copy.
848
- * @param {Object} [object={}] The object to copy properties to.
849
- * @param {Function} [customizer] The function to customize copied values.
850
- * @returns {Object} Returns `object`.
851
- */
852
- function copyObject(source, props, object, customizer) {
853
- object || (object = {});
854
- var index = -1, length = props.length;
855
- while (++index < length) {
856
- var key = props[index];
857
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
858
- assignValue(object, key, newValue === void 0 ? source[key] : newValue);
859
- }
860
- return object;
861
- }
862
- /**
863
- * Copies own symbol properties of `source` to `object`.
864
- *
865
- * @private
866
- * @param {Object} source The object to copy symbols from.
867
- * @param {Object} [object={}] The object to copy symbols to.
868
- * @returns {Object} Returns `object`.
869
- */
870
- function copySymbols(source, object) {
871
- return copyObject(source, getSymbols(source), object);
872
- }
873
- /**
874
- * Creates an array of own enumerable property names and symbols of `object`.
875
- *
876
- * @private
877
- * @param {Object} object The object to query.
878
- * @returns {Array} Returns the array of property names and symbols.
879
- */
880
- function getAllKeys(object) {
881
- return baseGetAllKeys(object, keys, getSymbols);
882
- }
883
- /**
884
- * Gets the data for `map`.
885
- *
886
- * @private
887
- * @param {Object} map The map to query.
888
- * @param {string} key The reference key.
889
- * @returns {*} Returns the map data.
890
- */
891
- function getMapData(map, key) {
892
- var data = map.__data__;
893
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
894
- }
895
- /**
896
- * Gets the native function at `key` of `object`.
897
- *
898
- * @private
899
- * @param {Object} object The object to query.
900
- * @param {string} key The key of the method to get.
901
- * @returns {*} Returns the function if it's native, else `undefined`.
902
- */
903
- function getNative(object, key) {
904
- var value = getValue(object, key);
905
- return baseIsNative(value) ? value : void 0;
906
- }
907
- /**
908
- * Creates an array of the own enumerable symbol properties of `object`.
909
- *
910
- * @private
911
- * @param {Object} object The object to query.
912
- * @returns {Array} Returns the array of symbols.
913
- */
914
- var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
915
- /**
916
- * Gets the `toStringTag` of `value`.
917
- *
918
- * @private
919
- * @param {*} value The value to query.
920
- * @returns {string} Returns the `toStringTag`.
921
- */
922
- var getTag = baseGetTag;
923
- if (DataView && getTag(new DataView(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) getTag = function(value) {
924
- var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
925
- if (ctorString) switch (ctorString) {
926
- case dataViewCtorString: return dataViewTag;
927
- case mapCtorString: return mapTag;
928
- case promiseCtorString: return promiseTag;
929
- case setCtorString: return setTag;
930
- case weakMapCtorString: return weakMapTag;
931
- }
932
- return result;
933
- };
934
- /**
935
- * Initializes an array clone.
936
- *
937
- * @private
938
- * @param {Array} array The array to clone.
939
- * @returns {Array} Returns the initialized clone.
940
- */
941
- function initCloneArray(array) {
942
- var length = array.length, result = array.constructor(length);
943
- if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
944
- result.index = array.index;
945
- result.input = array.input;
946
- }
947
- return result;
948
- }
949
- /**
950
- * Initializes an object clone.
951
- *
952
- * @private
953
- * @param {Object} object The object to clone.
954
- * @returns {Object} Returns the initialized clone.
955
- */
956
- function initCloneObject(object) {
957
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
958
- }
959
- /**
960
- * Initializes an object clone based on its `toStringTag`.
961
- *
962
- * **Note:** This function only supports cloning values with tags of
963
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
964
- *
965
- * @private
966
- * @param {Object} object The object to clone.
967
- * @param {string} tag The `toStringTag` of the object to clone.
968
- * @param {Function} cloneFunc The function to clone values.
969
- * @param {boolean} [isDeep] Specify a deep clone.
970
- * @returns {Object} Returns the initialized clone.
971
- */
972
- function initCloneByTag(object, tag, cloneFunc, isDeep) {
973
- var Ctor = object.constructor;
974
- switch (tag) {
975
- case arrayBufferTag: return cloneArrayBuffer(object);
976
- case boolTag:
977
- case dateTag: return new Ctor(+object);
978
- case dataViewTag: return cloneDataView(object, isDeep);
979
- case float32Tag:
980
- case float64Tag:
981
- case int8Tag:
982
- case int16Tag:
983
- case int32Tag:
984
- case uint8Tag:
985
- case uint8ClampedTag:
986
- case uint16Tag:
987
- case uint32Tag: return cloneTypedArray(object, isDeep);
988
- case mapTag: return cloneMap(object, isDeep, cloneFunc);
989
- case numberTag:
990
- case stringTag: return new Ctor(object);
991
- case regexpTag: return cloneRegExp(object);
992
- case setTag: return cloneSet(object, isDeep, cloneFunc);
993
- case symbolTag: return cloneSymbol(object);
994
- }
995
- }
996
- /**
997
- * Checks if `value` is a valid array-like index.
998
- *
999
- * @private
1000
- * @param {*} value The value to check.
1001
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1002
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1003
- */
1004
- function isIndex(value, length) {
1005
- length = length == null ? MAX_SAFE_INTEGER : length;
1006
- return !!length && (typeof value == "number" || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
1007
- }
1008
- /**
1009
- * Checks if `value` is suitable for use as unique object key.
1010
- *
1011
- * @private
1012
- * @param {*} value The value to check.
1013
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1014
- */
1015
- function isKeyable(value) {
1016
- var type = typeof value;
1017
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
1018
- }
1019
- /**
1020
- * Checks if `func` has its source masked.
1021
- *
1022
- * @private
1023
- * @param {Function} func The function to check.
1024
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1025
- */
1026
- function isMasked(func) {
1027
- return !!maskSrcKey && maskSrcKey in func;
1028
- }
1029
- /**
1030
- * Checks if `value` is likely a prototype object.
1031
- *
1032
- * @private
1033
- * @param {*} value The value to check.
1034
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1035
- */
1036
- function isPrototype(value) {
1037
- var Ctor = value && value.constructor;
1038
- return value === (typeof Ctor == "function" && Ctor.prototype || objectProto);
1039
- }
1040
- /**
1041
- * Converts `func` to its source code.
1042
- *
1043
- * @private
1044
- * @param {Function} func The function to process.
1045
- * @returns {string} Returns the source code.
1046
- */
1047
- function toSource(func) {
1048
- if (func != null) {
1049
- try {
1050
- return funcToString.call(func);
1051
- } catch (e) {}
1052
- try {
1053
- return func + "";
1054
- } catch (e) {}
1055
- }
1056
- return "";
1057
- }
1058
- /**
1059
- * This method is like `_.clone` except that it recursively clones `value`.
1060
- *
1061
- * @static
1062
- * @memberOf _
1063
- * @since 1.0.0
1064
- * @category Lang
1065
- * @param {*} value The value to recursively clone.
1066
- * @returns {*} Returns the deep cloned value.
1067
- * @see _.clone
1068
- * @example
1069
- *
1070
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
1071
- *
1072
- * var deep = _.cloneDeep(objects);
1073
- * console.log(deep[0] === objects[0]);
1074
- * // => false
1075
- */
1076
- function cloneDeep(value) {
1077
- return baseClone(value, true, true);
1078
- }
1079
- /**
1080
- * Performs a
1081
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1082
- * comparison between two values to determine if they are equivalent.
1083
- *
1084
- * @static
1085
- * @memberOf _
1086
- * @since 4.0.0
1087
- * @category Lang
1088
- * @param {*} value The value to compare.
1089
- * @param {*} other The other value to compare.
1090
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1091
- * @example
1092
- *
1093
- * var object = { 'a': 1 };
1094
- * var other = { 'a': 1 };
1095
- *
1096
- * _.eq(object, object);
1097
- * // => true
1098
- *
1099
- * _.eq(object, other);
1100
- * // => false
1101
- *
1102
- * _.eq('a', 'a');
1103
- * // => true
1104
- *
1105
- * _.eq('a', Object('a'));
1106
- * // => false
1107
- *
1108
- * _.eq(NaN, NaN);
1109
- * // => true
1110
- */
1111
- function eq(value, other) {
1112
- return value === other || value !== value && other !== other;
1113
- }
1114
- /**
1115
- * Checks if `value` is likely an `arguments` object.
1116
- *
1117
- * @static
1118
- * @memberOf _
1119
- * @since 0.1.0
1120
- * @category Lang
1121
- * @param {*} value The value to check.
1122
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1123
- * else `false`.
1124
- * @example
1125
- *
1126
- * _.isArguments(function() { return arguments; }());
1127
- * // => true
1128
- *
1129
- * _.isArguments([1, 2, 3]);
1130
- * // => false
1131
- */
1132
- function isArguments(value) {
1133
- return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
1134
- }
1135
- /**
1136
- * Checks if `value` is classified as an `Array` object.
1137
- *
1138
- * @static
1139
- * @memberOf _
1140
- * @since 0.1.0
1141
- * @category Lang
1142
- * @param {*} value The value to check.
1143
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1144
- * @example
1145
- *
1146
- * _.isArray([1, 2, 3]);
1147
- * // => true
1148
- *
1149
- * _.isArray(document.body.children);
1150
- * // => false
1151
- *
1152
- * _.isArray('abc');
1153
- * // => false
1154
- *
1155
- * _.isArray(_.noop);
1156
- * // => false
1157
- */
1158
- var isArray = Array.isArray;
1159
- /**
1160
- * Checks if `value` is array-like. A value is considered array-like if it's
1161
- * not a function and has a `value.length` that's an integer greater than or
1162
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1163
- *
1164
- * @static
1165
- * @memberOf _
1166
- * @since 4.0.0
1167
- * @category Lang
1168
- * @param {*} value The value to check.
1169
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1170
- * @example
1171
- *
1172
- * _.isArrayLike([1, 2, 3]);
1173
- * // => true
1174
- *
1175
- * _.isArrayLike(document.body.children);
1176
- * // => true
1177
- *
1178
- * _.isArrayLike('abc');
1179
- * // => true
1180
- *
1181
- * _.isArrayLike(_.noop);
1182
- * // => false
1183
- */
1184
- function isArrayLike(value) {
1185
- return value != null && isLength(value.length) && !isFunction(value);
1186
- }
1187
- /**
1188
- * This method is like `_.isArrayLike` except that it also checks if `value`
1189
- * is an object.
1190
- *
1191
- * @static
1192
- * @memberOf _
1193
- * @since 4.0.0
1194
- * @category Lang
1195
- * @param {*} value The value to check.
1196
- * @returns {boolean} Returns `true` if `value` is an array-like object,
1197
- * else `false`.
1198
- * @example
1199
- *
1200
- * _.isArrayLikeObject([1, 2, 3]);
1201
- * // => true
1202
- *
1203
- * _.isArrayLikeObject(document.body.children);
1204
- * // => true
1205
- *
1206
- * _.isArrayLikeObject('abc');
1207
- * // => false
1208
- *
1209
- * _.isArrayLikeObject(_.noop);
1210
- * // => false
1211
- */
1212
- function isArrayLikeObject(value) {
1213
- return isObjectLike(value) && isArrayLike(value);
1214
- }
1215
- /**
1216
- * Checks if `value` is a buffer.
1217
- *
1218
- * @static
1219
- * @memberOf _
1220
- * @since 4.3.0
1221
- * @category Lang
1222
- * @param {*} value The value to check.
1223
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1224
- * @example
1225
- *
1226
- * _.isBuffer(new Buffer(2));
1227
- * // => true
1228
- *
1229
- * _.isBuffer(new Uint8Array(2));
1230
- * // => false
1231
- */
1232
- var isBuffer = nativeIsBuffer || stubFalse;
1233
- /**
1234
- * Checks if `value` is classified as a `Function` object.
1235
- *
1236
- * @static
1237
- * @memberOf _
1238
- * @since 0.1.0
1239
- * @category Lang
1240
- * @param {*} value The value to check.
1241
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1242
- * @example
1243
- *
1244
- * _.isFunction(_);
1245
- * // => true
1246
- *
1247
- * _.isFunction(/abc/);
1248
- * // => false
1249
- */
1250
- function isFunction(value) {
1251
- var tag = isObject(value) ? objectToString.call(value) : "";
1252
- return tag == funcTag || tag == genTag;
1253
- }
1254
- /**
1255
- * Checks if `value` is a valid array-like length.
1256
- *
1257
- * **Note:** This method is loosely based on
1258
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1259
- *
1260
- * @static
1261
- * @memberOf _
1262
- * @since 4.0.0
1263
- * @category Lang
1264
- * @param {*} value The value to check.
1265
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1266
- * @example
1267
- *
1268
- * _.isLength(3);
1269
- * // => true
1270
- *
1271
- * _.isLength(Number.MIN_VALUE);
1272
- * // => false
1273
- *
1274
- * _.isLength(Infinity);
1275
- * // => false
1276
- *
1277
- * _.isLength('3');
1278
- * // => false
1279
- */
1280
- function isLength(value) {
1281
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1282
- }
1283
- /**
1284
- * Checks if `value` is the
1285
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1286
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1287
- *
1288
- * @static
1289
- * @memberOf _
1290
- * @since 0.1.0
1291
- * @category Lang
1292
- * @param {*} value The value to check.
1293
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1294
- * @example
1295
- *
1296
- * _.isObject({});
1297
- * // => true
1298
- *
1299
- * _.isObject([1, 2, 3]);
1300
- * // => true
1301
- *
1302
- * _.isObject(_.noop);
1303
- * // => true
1304
- *
1305
- * _.isObject(null);
1306
- * // => false
1307
- */
1308
- function isObject(value) {
1309
- var type = typeof value;
1310
- return !!value && (type == "object" || type == "function");
1311
- }
1312
- /**
1313
- * Checks if `value` is object-like. A value is object-like if it's not `null`
1314
- * and has a `typeof` result of "object".
1315
- *
1316
- * @static
1317
- * @memberOf _
1318
- * @since 4.0.0
1319
- * @category Lang
1320
- * @param {*} value The value to check.
1321
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1322
- * @example
1323
- *
1324
- * _.isObjectLike({});
1325
- * // => true
1326
- *
1327
- * _.isObjectLike([1, 2, 3]);
1328
- * // => true
1329
- *
1330
- * _.isObjectLike(_.noop);
1331
- * // => false
1332
- *
1333
- * _.isObjectLike(null);
1334
- * // => false
1335
- */
1336
- function isObjectLike(value) {
1337
- return !!value && typeof value == "object";
1338
- }
1339
- /**
1340
- * Creates an array of the own enumerable property names of `object`.
1341
- *
1342
- * **Note:** Non-object values are coerced to objects. See the
1343
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1344
- * for more details.
1345
- *
1346
- * @static
1347
- * @since 0.1.0
1348
- * @memberOf _
1349
- * @category Object
1350
- * @param {Object} object The object to query.
1351
- * @returns {Array} Returns the array of property names.
1352
- * @example
1353
- *
1354
- * function Foo() {
1355
- * this.a = 1;
1356
- * this.b = 2;
1357
- * }
1358
- *
1359
- * Foo.prototype.c = 3;
1360
- *
1361
- * _.keys(new Foo);
1362
- * // => ['a', 'b'] (iteration order is not guaranteed)
1363
- *
1364
- * _.keys('hi');
1365
- * // => ['0', '1']
1366
- */
1367
- function keys(object) {
1368
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1369
- }
1370
- /**
1371
- * This method returns a new empty array.
1372
- *
1373
- * @static
1374
- * @memberOf _
1375
- * @since 4.13.0
1376
- * @category Util
1377
- * @returns {Array} Returns the new empty array.
1378
- * @example
1379
- *
1380
- * var arrays = _.times(2, _.stubArray);
1381
- *
1382
- * console.log(arrays);
1383
- * // => [[], []]
1384
- *
1385
- * console.log(arrays[0] === arrays[1]);
1386
- * // => false
1387
- */
1388
- function stubArray() {
1389
- return [];
1390
- }
1391
- /**
1392
- * This method returns `false`.
1393
- *
1394
- * @static
1395
- * @memberOf _
1396
- * @since 4.13.0
1397
- * @category Util
1398
- * @returns {boolean} Returns `false`.
1399
- * @example
1400
- *
1401
- * _.times(2, _.stubFalse);
1402
- * // => [false, false]
1403
- */
1404
- function stubFalse() {
1405
- return false;
1406
- }
1407
- module.exports = cloneDeep;
1408
- }));
1409
- //#endregion
1410
- export { require_lodash_clonedeep as t };