@vinicunca/perkakas 0.3.6 → 0.4.0
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/commonjs/array/index.js +0 -4
- package/dist/commonjs/guard/has-sub-object.js +19 -0
- package/dist/commonjs/guard/index.js +3 -0
- package/dist/commonjs/guard/is-deep-equal.js +55 -0
- package/dist/commonjs/guard/is-included-in.js +11 -0
- package/dist/commonjs/object/from-keys.js +15 -0
- package/dist/commonjs/object/index.js +1 -1
- package/dist/commonjs/object/merge.js +2 -2
- package/dist/commonjs/object/omit-by.js +3 -2
- package/dist/commonjs/object/pick-by.js +3 -2
- package/dist/es/array/index.js +0 -4
- package/dist/es/guard/has-sub-object.js +15 -0
- package/dist/es/guard/index.js +3 -0
- package/dist/es/guard/is-deep-equal.js +51 -0
- package/dist/es/guard/is-included-in.js +7 -0
- package/dist/es/object/from-keys.js +11 -0
- package/dist/es/object/index.js +1 -1
- package/dist/es/object/merge.js +2 -2
- package/dist/es/object/omit-by.js +3 -2
- package/dist/es/object/pick-by.js +3 -2
- package/dist/metadata.json +6976 -6506
- package/dist/types/array/difference-with.d.ts +3 -3
- package/dist/types/array/drop-first-by.d.ts +0 -1
- package/dist/types/array/drop-first-by.d.ts.map +1 -1
- package/dist/types/array/drop-last.d.ts +2 -1
- package/dist/types/array/drop-last.d.ts.map +1 -1
- package/dist/types/array/drop.d.ts +2 -1
- package/dist/types/array/drop.d.ts.map +1 -1
- package/dist/types/array/filter.d.ts +14 -0
- package/dist/types/array/filter.d.ts.map +1 -1
- package/dist/types/array/find-index.d.ts +2 -0
- package/dist/types/array/find-index.d.ts.map +1 -1
- package/dist/types/array/find-last-index.d.ts +2 -0
- package/dist/types/array/find-last-index.d.ts.map +1 -1
- package/dist/types/array/first-by.d.ts +0 -1
- package/dist/types/array/first-by.d.ts.map +1 -1
- package/dist/types/array/flat-map.d.ts +2 -0
- package/dist/types/array/flat-map.d.ts.map +1 -1
- package/dist/types/array/flatten-deep.d.ts +5 -4
- package/dist/types/array/flatten-deep.d.ts.map +1 -1
- package/dist/types/array/flatten.d.ts +7 -6
- package/dist/types/array/flatten.d.ts.map +1 -1
- package/dist/types/array/group-by.d.ts +1 -0
- package/dist/types/array/group-by.d.ts.map +1 -1
- package/dist/types/array/has-at-least.d.ts +0 -1
- package/dist/types/array/has-at-least.d.ts.map +1 -1
- package/dist/types/array/index-by.d.ts +0 -1
- package/dist/types/array/index-by.d.ts.map +1 -1
- package/dist/types/array/index.d.ts +0 -4
- package/dist/types/array/index.d.ts.map +1 -1
- package/dist/types/array/last.d.ts +2 -1
- package/dist/types/array/last.d.ts.map +1 -1
- package/dist/types/array/length.d.ts +1 -0
- package/dist/types/array/length.d.ts.map +1 -1
- package/dist/types/array/nth-by.d.ts +0 -1
- package/dist/types/array/nth-by.d.ts.map +1 -1
- package/dist/types/array/only.d.ts +2 -1
- package/dist/types/array/only.d.ts.map +1 -1
- package/dist/types/array/rank-by.d.ts +0 -1
- package/dist/types/array/rank-by.d.ts.map +1 -1
- package/dist/types/array/reduce.d.ts +2 -0
- package/dist/types/array/reduce.d.ts.map +1 -1
- package/dist/types/array/reverse.d.ts +4 -2
- package/dist/types/array/reverse.d.ts.map +1 -1
- package/dist/types/array/sort-by.d.ts +2 -3
- package/dist/types/array/sort-by.d.ts.map +1 -1
- package/dist/types/array/sorted-index-by.d.ts +0 -1
- package/dist/types/array/sorted-index-by.d.ts.map +1 -1
- package/dist/types/array/sorted-index-with.d.ts +0 -1
- package/dist/types/array/sorted-index-with.d.ts.map +1 -1
- package/dist/types/array/sorted-index.d.ts +0 -1
- package/dist/types/array/sorted-index.d.ts.map +1 -1
- package/dist/types/array/sorted-last-index-by.d.ts +0 -1
- package/dist/types/array/sorted-last-index-by.d.ts.map +1 -1
- package/dist/types/array/sorted-last-index.d.ts +0 -1
- package/dist/types/array/sorted-last-index.d.ts.map +1 -1
- package/dist/types/array/splice.d.ts +2 -1
- package/dist/types/array/splice.d.ts.map +1 -1
- package/dist/types/array/split-at.d.ts +2 -0
- package/dist/types/array/split-at.d.ts.map +1 -1
- package/dist/types/array/take-first-by.d.ts +0 -1
- package/dist/types/array/take-first-by.d.ts.map +1 -1
- package/dist/types/array/uniq-with.d.ts +3 -3
- package/dist/types/function/conditional.d.ts +0 -1
- package/dist/types/function/conditional.d.ts.map +1 -1
- package/dist/types/function/purry.d.ts +1 -0
- package/dist/types/function/purry.d.ts.map +1 -1
- package/dist/types/function/times.d.ts +0 -1
- package/dist/types/function/times.d.ts.map +1 -1
- package/dist/types/guard/has-sub-object.d.ts +35 -0
- package/dist/types/guard/has-sub-object.d.ts.map +1 -0
- package/dist/types/guard/index.d.ts +3 -0
- package/dist/types/guard/index.d.ts.map +1 -1
- package/dist/types/guard/is-deep-equal.d.ts +50 -0
- package/dist/types/guard/is-deep-equal.d.ts.map +1 -0
- package/dist/types/guard/is-included-in.d.ts +54 -0
- package/dist/types/guard/is-included-in.d.ts.map +1 -0
- package/dist/types/number/add.d.ts +0 -1
- package/dist/types/number/add.d.ts.map +1 -1
- package/dist/types/number/ceil.d.ts +2 -1
- package/dist/types/number/ceil.d.ts.map +1 -1
- package/dist/types/number/clamp.d.ts +6 -6
- package/dist/types/number/divide.d.ts +0 -1
- package/dist/types/number/divide.d.ts.map +1 -1
- package/dist/types/number/floor.d.ts +2 -1
- package/dist/types/number/floor.d.ts.map +1 -1
- package/dist/types/number/multiply.d.ts +2 -1
- package/dist/types/number/multiply.d.ts.map +1 -1
- package/dist/types/number/round.d.ts +2 -1
- package/dist/types/number/round.d.ts.map +1 -1
- package/dist/types/number/subtract.d.ts +2 -1
- package/dist/types/number/subtract.d.ts.map +1 -1
- package/dist/types/object/from-keys.d.ts +42 -0
- package/dist/types/object/from-keys.d.ts.map +1 -0
- package/dist/types/object/from-pairs.d.ts +1 -1
- package/dist/types/object/index.d.ts +1 -1
- package/dist/types/object/index.d.ts.map +1 -1
- package/dist/types/object/invert.d.ts +2 -0
- package/dist/types/object/invert.d.ts.map +1 -1
- package/dist/types/object/keys.d.ts +1 -0
- package/dist/types/object/keys.d.ts.map +1 -1
- package/dist/types/object/merge.d.ts +39 -12
- package/dist/types/object/merge.d.ts.map +1 -1
- package/dist/types/object/path-or.d.ts +2 -0
- package/dist/types/object/path-or.d.ts.map +1 -1
- package/dist/types/object/pick-by.d.ts +2 -0
- package/dist/types/object/pick-by.d.ts.map +1 -1
- package/dist/types/object/set-path.d.ts +2 -0
- package/dist/types/object/set-path.d.ts.map +1 -1
- package/dist/types/object/values.d.ts +1 -0
- package/dist/types/object/values.d.ts.map +1 -1
- package/dist/types/string/cases-types.d.ts +13 -13
- package/dist/types/string/cases-types.d.ts.map +1 -1
- package/dist/types/string/cases.d.ts +9 -9
- package/dist/types/string/cases.d.ts.map +1 -1
- package/dist/types/string/random-string.d.ts +1 -0
- package/dist/types/string/random-string.d.ts.map +1 -1
- package/dist/types/utils/purry-order-rules.d.ts +4 -4
- package/dist/types/utils/purry-order-rules.d.ts.map +1 -1
- package/package.json +11 -10
- package/dist/commonjs/array/compact.js +0 -8
- package/dist/commonjs/array/count-by.js +0 -24
- package/dist/commonjs/array/difference.js +0 -22
- package/dist/commonjs/array/intersection.js +0 -22
- package/dist/commonjs/object/equals.js +0 -67
- package/dist/es/array/compact.js +0 -4
- package/dist/es/array/count-by.js +0 -20
- package/dist/es/array/difference.js +0 -18
- package/dist/es/array/intersection.js +0 -18
- package/dist/es/object/equals.js +0 -63
- package/dist/types/array/compact.d.ts +0 -12
- package/dist/types/array/compact.d.ts.map +0 -1
- package/dist/types/array/count-by.d.ts +0 -20
- package/dist/types/array/count-by.d.ts.map +0 -1
- package/dist/types/array/difference.d.ts +0 -35
- package/dist/types/array/difference.d.ts.map +0 -1
- package/dist/types/array/intersection.d.ts +0 -30
- package/dist/types/array/intersection.d.ts.map +0 -1
- package/dist/types/object/equals.d.ts +0 -30
- package/dist/types/object/equals.d.ts.map +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { purry } from '../function/purry';
|
|
2
|
-
function countBy_(indexed) {
|
|
3
|
-
return (array, fn) => {
|
|
4
|
-
let out = 0;
|
|
5
|
-
for (const [index, item] of array.entries()) {
|
|
6
|
-
const value = indexed ? fn(item, index, array) : fn(item);
|
|
7
|
-
out += value ? 1 : 0;
|
|
8
|
-
}
|
|
9
|
-
return out;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export function countBy(...args) {
|
|
13
|
-
return purry(countBy_(false), args);
|
|
14
|
-
}
|
|
15
|
-
(function (countBy) {
|
|
16
|
-
function indexed(...args) {
|
|
17
|
-
return purry(countBy_(true), args);
|
|
18
|
-
}
|
|
19
|
-
countBy.indexed = indexed;
|
|
20
|
-
})(countBy || (countBy = {}));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { purry } from '../function/purry';
|
|
2
|
-
import { reduceLazy } from '../utils/reduce-lazy';
|
|
3
|
-
export function difference(...args) {
|
|
4
|
-
return purry(difference_, args, difference.lazy);
|
|
5
|
-
}
|
|
6
|
-
function difference_(array, other) {
|
|
7
|
-
const lazy = difference.lazy(other);
|
|
8
|
-
return reduceLazy(array, lazy);
|
|
9
|
-
}
|
|
10
|
-
(function (difference) {
|
|
11
|
-
function lazy(other) {
|
|
12
|
-
const set = new Set(other);
|
|
13
|
-
return (value) => set.has(value)
|
|
14
|
-
? { done: false, hasNext: false }
|
|
15
|
-
: { done: false, hasNext: true, next: value };
|
|
16
|
-
}
|
|
17
|
-
difference.lazy = lazy;
|
|
18
|
-
})(difference || (difference = {}));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { purry } from '../function/purry';
|
|
2
|
-
import { reduceLazy } from '../utils/reduce-lazy';
|
|
3
|
-
export function intersection(...args) {
|
|
4
|
-
return purry(intersection_, args, intersection.lazy);
|
|
5
|
-
}
|
|
6
|
-
function intersection_(array, other) {
|
|
7
|
-
const lazy = intersection.lazy(other);
|
|
8
|
-
return reduceLazy(array, lazy);
|
|
9
|
-
}
|
|
10
|
-
(function (intersection) {
|
|
11
|
-
function lazy(other) {
|
|
12
|
-
const set = new Set(other);
|
|
13
|
-
return (value) => set.has(value)
|
|
14
|
-
? { done: false, hasNext: true, next: value }
|
|
15
|
-
: { done: false, hasNext: false };
|
|
16
|
-
}
|
|
17
|
-
intersection.lazy = lazy;
|
|
18
|
-
})(intersection || (intersection = {}));
|
package/dist/es/object/equals.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { purry } from '../function/purry';
|
|
2
|
-
export function equals(...args) {
|
|
3
|
-
return purry(equals_, args);
|
|
4
|
-
}
|
|
5
|
-
function equals_(a, b) {
|
|
6
|
-
if (a === b) {
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
if (typeof a === 'number' && typeof b === 'number') {
|
|
10
|
-
return Number.isNaN(a) && Number.isNaN(b);
|
|
11
|
-
}
|
|
12
|
-
if (typeof a !== 'object' || typeof b !== 'object') {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
if (a === null || b === null) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
const isArrayA = Array.isArray(a);
|
|
19
|
-
const isArrayB = Array.isArray(b);
|
|
20
|
-
if (isArrayA && isArrayB) {
|
|
21
|
-
if (a.length !== b.length) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
for (let i = 0; i < a.length; i++) {
|
|
25
|
-
if (!equals_(a[i], b[i])) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
if (isArrayA !== isArrayB) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
const isDateA = a instanceof Date;
|
|
35
|
-
const isDateB = b instanceof Date;
|
|
36
|
-
if (isDateA && isDateB) {
|
|
37
|
-
return a.getTime() === b.getTime();
|
|
38
|
-
}
|
|
39
|
-
if (isDateA !== isDateB) {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
const isRegExpA = a instanceof RegExp;
|
|
43
|
-
const isRegExpB = b instanceof RegExp;
|
|
44
|
-
if (isRegExpA && isRegExpB) {
|
|
45
|
-
return a.toString() === b.toString();
|
|
46
|
-
}
|
|
47
|
-
if (isRegExpA !== isRegExpB) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
const keys = Object.keys(a);
|
|
51
|
-
if (keys.length !== Object.keys(b).length) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
for (const key of keys) {
|
|
55
|
-
if (!Object.prototype.hasOwnProperty.call(b, key)) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
if (!equals_(a[key], b[key])) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Filter out all falsey values. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are falsey.
|
|
3
|
-
* @param items the array to compact
|
|
4
|
-
* @signature
|
|
5
|
-
* P.compact(array)
|
|
6
|
-
* @example
|
|
7
|
-
* P.compact([0, 1, false, 2, '', 3]) // => [1, 2, 3]
|
|
8
|
-
* @category Array
|
|
9
|
-
* @pipeable
|
|
10
|
-
*/
|
|
11
|
-
export declare function compact<T>(items: ReadonlyArray<'' | 0 | T | false | null | undefined>): Array<T>;
|
|
12
|
-
//# sourceMappingURL=compact.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../src/array/compact.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,GAC1D,KAAK,CAAC,CAAC,CAAC,CAGV"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Pred, PredIndexed } from '../utils/types';
|
|
2
|
-
/**
|
|
3
|
-
* Counts how many values of the collection pass the specified predicate.
|
|
4
|
-
* @param items The input data.
|
|
5
|
-
* @param fn The predicate.
|
|
6
|
-
* @signature
|
|
7
|
-
* P.countBy(array, fn)
|
|
8
|
-
* @example
|
|
9
|
-
* P.countBy([1, 2, 3, 4, 5], x => x % 2 === 0) // => 2
|
|
10
|
-
* @dataFirst
|
|
11
|
-
* @indexed
|
|
12
|
-
* @category Array
|
|
13
|
-
*/
|
|
14
|
-
export declare function countBy<T>(items: ReadonlyArray<T>, fn: Pred<T, boolean>): number;
|
|
15
|
-
export declare function countBy<T>(fn: Pred<T, boolean>): (array: ReadonlyArray<T>) => number;
|
|
16
|
-
export declare namespace countBy {
|
|
17
|
-
function indexed<T>(array: ReadonlyArray<T>, fn: PredIndexed<T, boolean>): number;
|
|
18
|
-
function indexed<T>(fn: PredIndexed<T, boolean>): (array: ReadonlyArray<T>) => number;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=count-by.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"count-by.d.ts","sourceRoot":"","sources":["../../../src/array/count-by.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAC;AAiB7E;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GACnB,MAAM,CAAC;AAEV,wBAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GACnB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;AAiBvC,yBAAiB,OAAO,CAAC;IACvB,SAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,GAC1B,MAAM,CAAC;IACV,SAAgB,OAAO,CAAC,CAAC,EACvB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,GAC1B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;CAIxC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { LazyEvaluator } from '../function/pipe';
|
|
2
|
-
/**
|
|
3
|
-
* Excludes the values from `other` array.
|
|
4
|
-
* @param array the source array
|
|
5
|
-
* @param other the values to exclude
|
|
6
|
-
* @signature
|
|
7
|
-
* P.difference(array, other)
|
|
8
|
-
* @example
|
|
9
|
-
* P.difference([1, 2, 3, 4], [2, 5, 3]) // => [1, 4]
|
|
10
|
-
* @dataFirst
|
|
11
|
-
* @category Array
|
|
12
|
-
* @pipeable
|
|
13
|
-
*/
|
|
14
|
-
export declare function difference<T>(array: ReadonlyArray<T>, other: ReadonlyArray<T>): Array<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Excludes the values from `other` array.
|
|
17
|
-
* @param other the values to exclude
|
|
18
|
-
* @signature
|
|
19
|
-
* P.difference(other)(array)
|
|
20
|
-
* @example
|
|
21
|
-
* P.difference([2, 5, 3])([1, 2, 3, 4]) // => [1, 4]
|
|
22
|
-
* P.pipe(
|
|
23
|
-
* [1, 2, 3, 4, 5, 6], // only 4 iterations
|
|
24
|
-
* P.difference([2, 3]),
|
|
25
|
-
* P.take(2)
|
|
26
|
-
* ) // => [1, 4]
|
|
27
|
-
* @dataLast
|
|
28
|
-
* @category Array
|
|
29
|
-
* @pipeable
|
|
30
|
-
*/
|
|
31
|
-
export declare function difference<T, K>(other: ReadonlyArray<T>): (array: ReadonlyArray<K>) => Array<T>;
|
|
32
|
-
export declare namespace difference {
|
|
33
|
-
function lazy<T>(other: ReadonlyArray<T>): LazyEvaluator<T>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=difference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../../../src/array/difference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,KAAK,CAAC,CAAC,CAAC,CAAC;AAEZ;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAC7B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAczC,yBAAiB,UAAU,CAAC;IAC1B,SAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAMjE;CACF"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { LazyEvaluator } from '../function/pipe';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a list of elements that exist in both array.
|
|
4
|
-
* @param array the source array
|
|
5
|
-
* @param other the second array
|
|
6
|
-
* @signature
|
|
7
|
-
* P.intersection(array, other)
|
|
8
|
-
* @example
|
|
9
|
-
* P.intersection([1, 2, 3], [2, 3, 5]) // => [2, 3]
|
|
10
|
-
* @dataFirst
|
|
11
|
-
* @category Array
|
|
12
|
-
* @pipeable
|
|
13
|
-
*/
|
|
14
|
-
export declare function intersection<T>(array: ReadonlyArray<T>, other: ReadonlyArray<T>): Array<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Returns a list of elements that exist in both array.
|
|
17
|
-
* @param other the second array
|
|
18
|
-
* @signature
|
|
19
|
-
* P.intersection(other)(array)
|
|
20
|
-
* @example
|
|
21
|
-
* P.intersection([2, 3, 5])([1, 2, 3]) // => [2, 3]
|
|
22
|
-
* @dataLast
|
|
23
|
-
* @category Array
|
|
24
|
-
* @pipeable
|
|
25
|
-
*/
|
|
26
|
-
export declare function intersection<T, K>(other: ReadonlyArray<T>): (source: ReadonlyArray<K>) => Array<T>;
|
|
27
|
-
export declare namespace intersection {
|
|
28
|
-
function lazy<T>(other: ReadonlyArray<T>): LazyEvaluator<T>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=intersection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../../src/array/intersection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,KAAK,CAAC,CAAC,CAAC,CAAC;AAEZ;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAc1C,yBAAiB,YAAY,CAAC;IAC5B,SAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAMjE;CACF"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns true if its arguments are equivalent, false otherwise.
|
|
3
|
-
* NOTE: Doesn't handle cyclical data structures.
|
|
4
|
-
* @param a the first object to compare
|
|
5
|
-
* @param b the second object to compare
|
|
6
|
-
* @signature
|
|
7
|
-
* P.equals(a, b)
|
|
8
|
-
* @example
|
|
9
|
-
* P.equals(1, 1) //=> true
|
|
10
|
-
* P.equals(1, '1') //=> false
|
|
11
|
-
* P.equals([1, 2, 3], [1, 2, 3]) //=> true
|
|
12
|
-
* @dataFirst
|
|
13
|
-
* @category Object
|
|
14
|
-
*/
|
|
15
|
-
export declare function equals(a: unknown, b: unknown): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Returns true if its arguments are equivalent, false otherwise.
|
|
18
|
-
* NOTE: Doesn't handle cyclical data structures.
|
|
19
|
-
* @param a the first object to compare
|
|
20
|
-
* @signature
|
|
21
|
-
* P.equals(b)(a)
|
|
22
|
-
* @example
|
|
23
|
-
* P.equals(1)(1) //=> true
|
|
24
|
-
* P.equals('1')(1) //=> false
|
|
25
|
-
* P.equals([1, 2, 3])([1, 2, 3]) //=> true
|
|
26
|
-
* @dataLast
|
|
27
|
-
* @category Object
|
|
28
|
-
*/
|
|
29
|
-
export declare function equals(a: unknown): (b: unknown) => boolean;
|
|
30
|
-
//# sourceMappingURL=equals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../src/object/equals.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC"}
|