moderndash 0.0.11 → 0.0.13

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/index.d.ts DELETED
@@ -1,668 +0,0 @@
1
- /**
2
- * Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.
3
- *
4
- * @category Array
5
- * @returns Returns the new array of chunks.
6
- * @param chunkSize - The array to process.
7
- * @param array - The length of each chunk
8
- * @example
9
- * chunk(2, ['a', 'b', 'c', 'd'])
10
- * // => [['a', 'b'], ['c', 'd']]
11
- *
12
- * chunk(3, ['a', 'b', 'c', 'd'])
13
- * // => [['a', 'b', 'c'], ['d']]
14
- */
15
- declare function chunk<TInput>(chunkSize: number, array: TInput[]): TInput[][];
16
-
17
- type MinimumTwoArrays<TInput> = [TInput[], TInput[], ...TInput[][]];
18
- type IterateeFunction<T> = (value: T) => unknown;
19
- type PropertyShorthand<T> = keyof T;
20
- type RecordKey = string | number | symbol;
21
- type ArrayOrRecord<TInput> = TInput[] | Record<RecordKey, TInput>;
22
- type NoUnion<T, U = T> = T extends U ? [U] extends [T] ? T : never : never;
23
- /**
24
- * @description Generic function type, should fit any function
25
- * @typeParam TFunc - The input function type
26
- */
27
- type GenericFunction<TFunc extends (...args: Parameters<TFunc>) => ReturnType<TFunc>> = (...args: Parameters<TFunc>) => ReturnType<TFunc>;
28
-
29
- /**
30
- * Creates an array of `array` values not included in the other given arrays. The order and references of result values are determined by the first array.
31
- *
32
- * **Note:** Unlike `pullAll`, this method returns a new array.
33
- *
34
- * @category Array
35
- * @param arrays - First array is inspected, others are excluded.
36
- * @returns Returns the new array of filtered values.
37
- * @example
38
- * difference([2, 1], [2, 3])
39
- * // => [1]
40
- */
41
- declare function difference<TInput>(...arrays: MinimumTwoArrays<TInput>): TInput[];
42
-
43
- /**
44
- * This method is like `difference` except that it accepts `iteratee` which
45
- * is invoked for each element of `array` and `values` to generate the criterion
46
- * by which they're compared. The order and references of result values are
47
- * determined by the first array.
48
- *
49
- * **Note:** Unlike `pullAllBy`, this method returns a new array.
50
- *
51
- * @category Array
52
- * @param iteratee - The iteratee invoked per element. Or property shorthand.
53
- * @param arrays - First array to inspect. Others are excluded.
54
-
55
- * @returns Returns the new array of filtered values.
56
- * @example
57
- * differenceBy(Math.floor, [2.1, 1.2], [2.3, 3.4])
58
- * // => [1.2]
59
- * differenceBy('x', [{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }])
60
- * // => [{ 'x': 2 }]
61
- */
62
- declare function differenceBy<T>(iteratee: IterateeFunction<T> | PropertyShorthand<T>, ...arrays: MinimumTwoArrays<T>): T[];
63
-
64
- /**
65
- * This method is like `difference` except that it accepts `comparator`
66
- * which is invoked to compare elements of `array` to `values`. The order and
67
- * references of result values are determined by the first array. The comparator
68
- * is invoked with two arguments: (arrVal, othVal).
69
- *
70
- * **Note:** Unlike `pullAllWith`, this method returns a new array.
71
- *
72
- * @category Array
73
- * @param comparator - The comparator invoked per element.
74
- * @param arrays - First array to inspect. Others are excluded.
75
- * @returns Returns the new array of filtered values.
76
- * @example
77
- * differenceWith(isEqual, [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }], [{ 'x': 1, 'y': 2 }])
78
- * // => [{ 'x': 2, 'y': 1 }]
79
- */
80
- declare function differenceWith<T>(comparator: (a: T, b: T) => boolean, ...arrays: MinimumTwoArrays<T>): T[];
81
-
82
- /**
83
- * Creates a slice of `array` excluding elements dropped from the end.
84
- * Elements are dropped until `predicate` returns falsey. The predicate is
85
- * invoked with three arguments: (value, index, array).
86
- *
87
- * @category Array
88
- * @param predicate - The function invoked per iteration.
89
- * @param array - The array to query.
90
- * @returns Returns the slice of `array`.
91
- * @example
92
- * const users = [
93
- * { 'user': 'barney', 'active': false },
94
- * { 'user': 'fred', 'active': true },
95
- * { 'user': 'pebbles', 'active': true }
96
- * ]
97
- *
98
- * dropRightWhile(({ active }) => active, users)
99
- * // => objects for ['barney']
100
- */
101
- declare function dropRightWhile<T>(predicate: (value: T) => boolean, array: T[]): T[];
102
-
103
- /**
104
- * Creates a slice of `array` excluding elements dropped from the beginning.
105
- * Elements are dropped until `predicate` returns falsey. The predicate is
106
- * invoked with three arguments: (value, index, array).
107
- *
108
- * @category Array
109
- * @param predicate - The function invoked per iteration.
110
- * @param array - The array to query.
111
- * @returns Returns the slice of `array`.
112
- * @example
113
- * const users = [
114
- * { 'user': 'barney', 'active': true },
115
- * { 'user': 'fred', 'active': true },
116
- * { 'user': 'pebbles', 'active': false }
117
- * ]
118
- *
119
- * dropWhile(({ active }) => active, users)
120
- * // => objects for ['pebbles']
121
- */
122
- declare function dropWhile<T>(predicate: (value: T) => boolean, array: T[]): T[];
123
-
124
- /**
125
- * Creates an array of unique values that are included in all given arrays.
126
- * The order and references of result values are determined by the first array.
127
- *
128
- * @category Array
129
- * @param arrays - The arrays to inspect.
130
- * @returns Returns the new array of intersecting values.
131
- * @example
132
- * intersection([2, 1], [2, 3])
133
- * // => [2]
134
- */
135
- declare function intersection<TInput>(...arrays: MinimumTwoArrays<TInput>): TInput[];
136
-
137
- /**
138
- * This method is like `intersection` except that it accepts `iteratee`
139
- * which is invoked for each element of each `arrays` to generate the criterion
140
- * by which they're compared. The order and references of result values are
141
- * determined by the first array. The iteratee is invoked with one argument:
142
- * (value).
143
- *
144
- * @category Array
145
- * @param iteratee - The iteratee invoked per element. Or property shorthand.
146
- * @param arrays - The arrays to inspect.
147
- * @returns Returns the new array of intersecting values.
148
- * @example
149
- * intersectionBy(Math.floor, [2.1, 1.2], [2.3, 3.4])
150
- * // => [2.1]
151
- */
152
- declare function intersectionBy<TInput>(iteratee: IterateeFunction<TInput> | PropertyShorthand<TInput>, ...arrays: MinimumTwoArrays<TInput>): TInput[];
153
-
154
- /**
155
- * This method is like `intersection` except that it accepts `comparator`
156
- * which is invoked to compare elements of `arrays`. The order and references
157
- * of result values are determined by the first array. The comparator is
158
- * invoked with two arguments: (arrVal, othVal).
159
- *
160
- * @category Array
161
- * @param comparator - The comparator invoked per element.
162
- * @param arrays - The arrays to inspect.
163
- * @returns Returns the new array of intersecting values.
164
- * @example
165
- * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
166
- * const others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]
167
- *
168
- * intersectionWith(isEqual, objects, others)
169
- * // => [{ 'x': 1, 'y': 2 }]
170
- */
171
- declare function intersectionWith<T>(comparator: (a: T, b: T) => boolean, ...arrays: MinimumTwoArrays<T>): T[];
172
-
173
- /**
174
- * Gets a random element from `array`.
175
- *
176
- * @category Array
177
- * @param array - The array to sample.
178
- * @returns Returns the random element.
179
- * @example
180
- * sample([1, 2, 3, 4])
181
- * // => 2
182
- */
183
- declare function sample<T>(array: T[]): T | undefined;
184
-
185
- /**
186
- * Gets `n` random elements at unique keys from `array` up to the
187
- * size of `array`.
188
- *
189
- * @category Array
190
- * @param size The number of elements to sample.
191
- * @param array The array to sample.
192
- * @returns Returns the random elements.
193
- * @example
194
- * sampleSize([1, 2, 3], 2)
195
- * // => [3, 1]
196
- *
197
- * sampleSize([1, 2, 3], 4)
198
- * // => [2, 3, 1]
199
- */
200
- declare function sampleSize<TInput>(size: number, array: TInput[]): TInput[];
201
-
202
- /**
203
- * Creates an array of shuffled values, using a version of the
204
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
205
- *
206
- * @since 0.1.0
207
- * @category Array
208
- * @param array - The array or object to shuffle.
209
- * @returns {Array} Returns the new shuffled array.
210
- * @example
211
- * shuffle([1, 2, 3, 4])
212
- * // => [4, 1, 3, 2]
213
- */
214
- declare function shuffle<TInput>(array: TInput[]): TInput[];
215
-
216
- /**
217
- * Creates a slice of `array` with elements taken from the end. Elements are
218
- * taken until `predicate` returns falsey. The predicate is invoked with
219
- * three arguments: (value, index, array).
220
- *
221
- * @category Array
222
- * @param predicate - The function invoked per iteration.
223
- * @param array - The array to query.
224
- * @returns Returns the slice of `array`.
225
- * @example
226
- * const users = [
227
- * { 'user': 'barney', 'active': false },
228
- * { 'user': 'fred', 'active': true },
229
- * { 'user': 'pebbles', 'active': true }
230
- * ]
231
- *
232
- * takeRightWhile(({ active }) => active, users)
233
- * // => objects for ['fred', 'pebbles']
234
- */
235
- declare function takeRightWhile<T>(predicate: (elem: T) => boolean, array: T[]): T[];
236
-
237
- /**
238
- * Creates a slice of `array` with elements taken from the beginning. Elements
239
- * are taken until `predicate` returns falsey. The predicate is invoked with
240
- * three arguments: (value, index, array).
241
- *
242
- * @category Array
243
- * @param predicate The function invoked per iteration.
244
- * @param array The array to query.
245
- * @returns Returns the slice of `array`.
246
- * @example
247
- * const users = [
248
- * { 'user': 'barney', 'active': true },
249
- * { 'user': 'fred', 'active': true },
250
- * { 'user': 'pebbles', 'active': false }
251
- * ]
252
- *
253
- * takeWhile(({ active }) => active, users)
254
- * // => objects for ['barney', 'fred']
255
- */
256
- declare function takeWhile<T>(predicate: (elem: T) => boolean, array: T[]): T[];
257
-
258
- /**
259
- * Creates a duplicate-free version of an array, in which only the first occurrence of each element is kept.
260
- * The order of result values is determined by the order they occur in the array.
261
- *
262
- * @category Array
263
- * @param array - The array to inspect.
264
- * @returns Returns the new duplicate free array.
265
- * @example
266
- * uniq([2, 1, 2])
267
- * // => [2, 1]
268
- */
269
- declare function uniq<TInput>(array: TInput[]): TInput[];
270
-
271
- /**
272
- * This method is like `uniq` except that it accepts `iteratee` which is
273
- * invoked for each element in `array` to generate the criterion by which
274
- * uniqueness is computed. The order of result values is determined by the
275
- * order they occur in the array.
276
- *
277
- * @category Array
278
- * @param array - The array to inspect.
279
- * @param iteratee - The iteratee invoked per element. Or property shorthand.
280
- * @returns Returns the new duplicate free array.
281
- * @example
282
- * uniqBy(Math.floor, [2.1, 1.2, 2.3])
283
- * // => [2.1, 1.2]
284
- */
285
- declare function uniqBy<T>(iteratee: IterateeFunction<T> | PropertyShorthand<T>, array: T[]): T[];
286
-
287
- /**
288
- * This method is like `uniq` except that it accepts `comparator` which is invoked to compare elements of `array`.
289
- * The order of result values is determined by the order they occur in the array.
290
- *
291
- * @category Array
292
- * @param array - The array to inspect.
293
- * @param comparator - The comparator invoked per element.
294
- * @returns {Array} Returns the new duplicate free array.
295
- * @example
296
- * const objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]
297
- *
298
- * uniqWith(isEqual, objects)
299
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
300
- */
301
- declare function uniqWith<TInput>(comparator: (a: TInput, b: TInput) => boolean, array: TInput[]): TInput[];
302
-
303
- /**
304
- * This method is like `zip` except that it accepts an array of grouped
305
- * elements and creates an array regrouping the elements to their pre-zip configuration.
306
- *
307
- * @category Array
308
- * @param array - The array of grouped elements to process.
309
- * @returns Returns the new array of regrouped elements.
310
- * @example
311
- * const zipped = zip(['a', 'b'], [1, 2], [true, false])
312
- * // => [['a', 1, true], ['b', 2, false]]
313
- *
314
- * unzip(zipped)
315
- * // => [['a', 'b'], [1, 2], [true, false]]
316
- */
317
- declare function unzip<TInput extends unknown[]>(array: TInput[]): TInput[];
318
-
319
- /**
320
- * This method is like `unzip` except that it accepts `iteratee` to specify
321
- * how regrouped values should be combined. The iteratee is invoked with the
322
- * elements of each group: (...group).
323
- *
324
- * @category Array
325
- * @param iteratee - The function to combine regrouped values.
326
- * @param array - The array of grouped elements to process.
327
- * @returns Returns the new array of regrouped elements.
328
- * @example
329
- * const zipped = zip([1, 2], [10, 20], [100, 200])
330
- * // => [[1, 10, 100], [2, 20, 200]]
331
- *
332
- * unzipWith(add, zipped)
333
- * // => [3, 30, 300]
334
- */
335
- declare function unzipWith<TInput extends unknown[], TOutput>(iteratee: (...t: TInput) => TOutput, array: TInput[]): TOutput[];
336
-
337
- /**
338
- * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,
339
- * the second of which contains the second elements of the given arrays, and so on.
340
- *
341
- * @category Array
342
- * @param arrays - The arrays to process.
343
- * @returns Returns the new array of grouped elements.
344
- * @example
345
- * zip(['a', 'b'], [1, 2], [true, false])
346
- * // => [['a', 1, true], ['b', 2, false]]
347
- */
348
- declare function zip<TInput>(...arrays: TInput[][]): TInput[][];
349
-
350
- type UnZip<A extends readonly unknown[]> = {
351
- [K in keyof A]: readonly A[K][];
352
- };
353
- /**
354
- * This method is like `zip` except that it accepts `iteratee` to specify
355
- * how grouped values should be combined. The iteratee is invoked with the
356
- * elements of each group: (...group).
357
- *
358
- * @category Array
359
- * @param combineFunc - The function to combine grouped values.
360
- * @param arrays - The arrays to process.
361
- * @returns Returns the new array of grouped elements.
362
- * @example
363
- * zipWith([1, 2], [10, 20], [100, 200], (a, b, c) => a + b + c)
364
- * // => [111, 222]
365
- */
366
- declare function zipWith<Args extends unknown[], TOutput>(combineFunc: (...args: Args) => TOutput, ...arrays: UnZip<Args>): TOutput[];
367
-
368
- /**
369
- * Creates an object composed of keys generated from the results of running
370
- * each element of `collection` thru `iteratee`. The corresponding value of
371
- * each key is the number of times the key was returned by `iteratee`.
372
- *
373
- * @category Collection
374
- * @param iteratee - The iteratee to transform keys.
375
- * @param collection - The array or record to iterate over.
376
- * @returns Returns the composed aggregate object.
377
- * @example
378
- * const users = [
379
- * { 'user': 'barney', 'active': true },
380
- * { 'user': 'betty', 'active': true },
381
- * { 'user': 'fred', 'active': false }
382
- * ]
383
- *
384
- * countBy(users, value => value.active);
385
- * // => { 'true': 2, 'false': 1 }
386
- */
387
- declare function countBy<TInput, TKey extends RecordKey>(collection: ArrayOrRecord<TInput>, iteratee: (value: TInput) => TKey): Record<TKey, number>;
388
-
389
- /**
390
- * Creates an object composed of keys generated from the results of running
391
- * each element of `collection` thru `iteratee`. The order of grouped values
392
- * is determined by the order they occur in `collection`. The corresponding
393
- * value of each key is an array of elements responsible for generating the
394
- * key.
395
- *
396
- * @category Collection
397
- * @param collection - The array or object to iterate over.
398
- * @param iteratee - The iteratee to transform keys.
399
- * @returns Returns the composed aggregate object.
400
- * @example
401
- * groupBy([6.1, 4.2, 6.3], Math.floor)
402
- * // => { '4': [4.2], '6': [6.1, 6.3] }
403
- */
404
- declare function groupBy<T, U extends RecordKey>(collection: ArrayOrRecord<T>, iteratee: (value: T) => U): Record<U, T[]>;
405
-
406
- declare function sortBy<T, U>(iteratee: (item: T) => NoUnion<number | bigint | Date | string, U>, array: T[]): T[];
407
-
408
- /**
409
- * The opposite of `before`. This method creates a function that invokes `func` once it's called `n` or more times.
410
- *
411
- * @category Function
412
- * @param n The number of calls before `func` is invoked.
413
- * @param func The function to restrict.
414
- * @returns Returns the new restricted function.
415
- * @example
416
- * const caution = () => console.log("Caution!");
417
- *
418
- * const afterFN = after(2, caution);
419
- *
420
- * afterFN()
421
- * afterFN()
422
- * afterFN()
423
- * // => `caution` is invoked after called twice
424
- */
425
- declare function after<TFunc extends GenericFunction<TFunc>>(n: number, func: TFunc): (...args: Parameters<TFunc>) => ReturnType<TFunc> | undefined;
426
-
427
- /**
428
- * Creates a function that invokes `func`, while it's called less than `n` times. Subsequent
429
- * calls to the created function return the result of the last `func` invocation.
430
- *
431
- * @category Function
432
- * @param n - The number of calls at which `func` is no longer invoked.
433
- * @param func - The function to restrict.
434
- * @returns Returns the new restricted function.
435
- * @example
436
- * const caution = () => console.log("Caution!");
437
- *
438
- * // Only call caution two times
439
- * const reducedCaution = before(2, caution)
440
- *
441
- * reducedCaution()
442
- * reducedCaution()
443
- * reducedCaution()
444
- * // => `caution` is invoked twice
445
- */
446
- declare function before<TFunc extends (...args: Parameters<TFunc>) => ReturnType<TFunc>>(n: number, func: TFunc): TFunc;
447
-
448
- declare function debounce<TFunc extends GenericFunction<TFunc>>(fn: TFunc, wait?: number, options?: {
449
- leading?: boolean;
450
- maxWait?: number;
451
- trailing?: boolean;
452
- }): (this: ThisParameterType<TFunc>, ...args: Parameters<TFunc>) => ReturnType<TFunc>;
453
-
454
- /**
455
- * Creates a function that memoizes the result of `func`. If `resolver` is
456
- * provided, it determines the cache key for storing the result based on the
457
- * arguments provided to the memoized function. By default, all arguments
458
- * provided to the memoized function are used as the map cache key.
459
- *
460
- * **Note:** The cache is exposed as the `cache` property on the memoized
461
- * function. Its creation may be customized by replacing the `memoize.Cache`
462
- * constructor with one whose instances implement the
463
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
464
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
465
- *
466
- * @category Function
467
- * @param func - The function to have its output memoized.
468
- * @param resolver - The function to resolve the cache key.
469
- * @typeParam TFunc - The input function type
470
- * @typeParam Cache - The cache map type
471
- * @returns Returns the new memoized function.
472
- * @example
473
- * const object = \{ 'a': 1, 'b': 2 \}
474
- *
475
- * const values = memoize(values)
476
- * values(object)
477
- * // => [1, 2]
478
- *
479
- * values(object)
480
- * // => [1, 2]
481
- *
482
- * object.a = 2
483
- * values(object)
484
- * // => [2, 2]
485
- *
486
- * // Modify the result cache.
487
- * values.cache.set(object, ['a', 'b'])
488
- * values(object)
489
- * // => ['a', 'b']
490
- *
491
- * // Replace `memoize.Cache`.
492
- * memoize.Cache = WeakMap
493
- */
494
- declare function memoize<TFunc extends GenericFunction<TFunc>, Cache extends Map<string | symbol, ReturnType<TFunc>>>(func: TFunc, resolver?: ((...args: Parameters<TFunc>) => string | symbol)): TFunc & {
495
- cache: Cache;
496
- };
497
-
498
- /**
499
- * Creates a function that is restricted to invoking `func` once. Repeat calls
500
- * to the function return the value of the first invocation. The `func` is
501
- * invoked with the `this` binding and arguments of the created function.
502
- *
503
- * @category Function
504
- * @param func - The function to restrict.
505
- * @returns Returns the new restricted function.
506
- * @example
507
- * const initialize = once(() => console.log('initialize'))
508
- * initialize()
509
- * initialize()
510
- * // => `createApplication` is invoked once
511
- */
512
- declare function once<TFunc extends GenericFunction<TFunc>>(func: TFunc): TFunc;
513
-
514
- declare function throttle<TFunc extends GenericFunction<TFunc>>(func: TFunc, wait?: number, options?: {
515
- leading?: boolean;
516
- trailing?: boolean;
517
- }): (this: ThisParameterType<TFunc>, ...args: Parameters<TFunc>) => ReturnType<TFunc>;
518
-
519
- /**
520
- * Invokes the iteratee `n` times, returning an array of the results of
521
- * each invocation. The function is invoked with one argument: (index).
522
- *
523
- * @category Function
524
- * @param n - The number of times to invoke `func`.
525
- * @param iteratee - The function invoked per iteration.
526
- * @returns Returns the array of results.
527
- * @example
528
- * times(3, index => console.log("Run", index)))
529
- * // => "Run 0" | "Run 1" | "Run 2"
530
- *
531
- * times(3, Math.random)
532
- * // => [0.123, 0.456, 0.789]
533
- *
534
- * times(4, () => 0)
535
- * // => [0, 0, 0, 0]
536
- */
537
- declare function times<T>(n: number, func: (index: number) => T): T[];
538
-
539
- /**
540
- * Checks if `value` is an empty object, collection, map, or set.
541
- *
542
- * Objects are considered empty if they have no own enumerable string keyed
543
- * properties.
544
- *
545
- * Array-like values such as `arguments` objects, arrays, buffers, strings, or
546
- * Similarly, maps and sets are considered empty if they have a `size` of `0`.
547
- *
548
- * @category Lang
549
- * @param value - The value to check.
550
- * @returns Returns `true` if `value` is empty, else `false`.
551
- * @example
552
- * isEmpty(null)
553
- * // => true
554
- *
555
- * isEmpty({})
556
- * // => true
557
- *
558
- * isEmpty("")
559
- * // => true
560
- *
561
- * isEmpty([1, 2, 3])
562
- * // => false
563
- *
564
- * isEmpty('abc')
565
- * // => false
566
- *
567
- * isEmpty({ 'a': 1 })
568
- * // => false
569
- */
570
- declare function isEmpty(value: string | object | null | undefined): boolean;
571
-
572
- /**
573
- * Performs a deep comparison between two values to determine if they are
574
- * equivalent.
575
- *
576
- * **Note:** This method supports comparing arrays, array buffers, booleans,
577
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
578
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
579
- * by their own, not inherited, enumerable properties. Functions and DOM
580
- * nodes are compared by strict equality, i.e. `===`.
581
- *
582
- * @category Lang
583
- * @param value1 - The value to compare.
584
- * @param value2 - The other value to compare.
585
- * @returns Returns `true` if the values are equivalent, else `false`.
586
- * @example
587
- * var object = { 'a': 1 };
588
- * var other = { 'a': 1 };
589
- *
590
- * _.isEqual(object, other);
591
- * // => true
592
- *
593
- * object === other;
594
- * // => false
595
- */
596
- declare function isEqual(value1: unknown, value2: unknown): boolean;
597
-
598
- /**
599
- * This method is like `_.isEqual` except that it accepts `customizer` which
600
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
601
- * are handled by the method instead. The `customizer` is invoked with up to
602
- * six arguments: (objValue, othValue [, index|key, object, other, stack]).
603
- *
604
- * @category Lang
605
- * @param value1 - The value to compare.
606
- * @param value2 - The other value to compare.
607
- * @param customizer - The function to customize comparisons.
608
- * @returns Returns `true` if the values are equivalent, else `false`.
609
- * @example
610
- * function isGreeting(value) {
611
- * return /^h(?:i|ello)$/.test(value);
612
- * }
613
- *
614
- * function customizer(objValue, othValue) {
615
- * if (isGreeting(objValue) && isGreeting(othValue)) {
616
- * return true;
617
- * }
618
- * }
619
- *
620
- * var array = ['hello', 'goodbye'];
621
- * var other = ['hi', 'goodbye'];
622
- *
623
- * isEqualWith(array, other, customizer);
624
- * // => true
625
- */
626
- declare function isEqualWith<T>(a: T, b: T, customizer: (value: T) => unknown): boolean;
627
-
628
- declare function isPlainObject(value: unknown): value is object;
629
-
630
- /**
631
- * Creates an object composed of the picked `object` properties.
632
- *
633
- * @category Object
634
- * @param object The source object.
635
- * @param keys The property paths to pick.
636
- * @returns {Object} Returns the new object.
637
- * @example
638
- *
639
- * const object = { 'a': 1, 'b': '2', 'c': 3 }
640
- *
641
- * pick(object, ['a', 'c'])
642
- * // => { 'a': 1, 'c': 3 }
643
- */
644
- declare function pick<T, K extends keyof T>(object: T, keys: K[]): Pick<T, K>;
645
-
646
- declare function camelCase(str: string): string;
647
-
648
- declare function capitalize(str: string): string;
649
-
650
- declare function deburr(str: string): string;
651
-
652
- declare function escape(str: string): string;
653
-
654
- declare function escapeRegExp(str: string): string;
655
-
656
- declare function kebabCase(str: string): string;
657
-
658
- declare function pascalCase(str: string): string;
659
-
660
- declare function snakeCase(str: string): string;
661
-
662
- declare function startCase(str: string): string;
663
-
664
- declare function stripSpecialChars(str: string): string;
665
-
666
- declare function unescapeHTML(html: string): string;
667
-
668
- export { ArrayOrRecord, GenericFunction, IterateeFunction, MinimumTwoArrays, NoUnion, PropertyShorthand, RecordKey, after, before, camelCase, capitalize, chunk, countBy, debounce, deburr, difference, differenceBy, differenceWith, dropRightWhile, dropWhile, escape, escapeRegExp, groupBy, intersection, intersectionBy, intersectionWith, isEmpty, isEqual, isEqualWith, isPlainObject, kebabCase, memoize, once, pascalCase, pick, sample, sampleSize, shuffle, snakeCase, sortBy, startCase, stripSpecialChars, takeRightWhile, takeWhile, throttle, times, unescapeHTML, uniq, uniqBy, uniqWith, unzip, unzipWith, zip, zipWith };