@asd14/m 7.3.0 → 7.6.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/README.md +31 -28
- package/dist/all/all.js +15 -21
- package/dist/all/all.js.map +1 -1
- package/dist/all/all.test.js +58 -36
- package/dist/all/all.test.js.map +1 -1
- package/dist/any/any.js +16 -22
- package/dist/any/any.js.map +1 -1
- package/dist/any/any.test.js +54 -33
- package/dist/any/any.test.js.map +1 -1
- package/dist/append/append.js +9 -11
- package/dist/append/append.js.map +1 -1
- package/dist/append/append.test.js +37 -7
- package/dist/append/append.test.js.map +1 -1
- package/dist/bottom/bottom.js +23 -29
- package/dist/bottom/bottom.js.map +1 -1
- package/dist/bottom/bottom.test.js +53 -13
- package/dist/bottom/bottom.test.js.map +1 -1
- package/dist/cases/cases.js +5 -13
- package/dist/cases/cases.js.map +1 -1
- package/dist/cases/cases.test.js +67 -35
- package/dist/cases/cases.test.js.map +1 -1
- package/dist/clone/clone.js +21 -30
- package/dist/clone/clone.js.map +1 -1
- package/dist/clone/clone.test.js +38 -37
- package/dist/clone/clone.test.js.map +1 -1
- package/dist/compact/compact.js +39 -39
- package/dist/compact/compact.js.map +1 -1
- package/dist/compact/compact.test.js +83 -43
- package/dist/compact/compact.test.js.map +1 -1
- package/dist/contains/contains.js +6 -10
- package/dist/contains/contains.js.map +1 -1
- package/dist/contains/contains.test.js +7 -6
- package/dist/contains/contains.test.js.map +1 -1
- package/dist/converge/converge.js +34 -37
- package/dist/converge/converge.js.map +1 -1
- package/dist/converge/converge.test.js +62 -25
- package/dist/converge/converge.test.js.map +1 -1
- package/dist/count/count.js +36 -51
- package/dist/count/count.js.map +1 -1
- package/dist/count/count.test.js +97 -67
- package/dist/count/count.test.js.map +1 -1
- package/dist/curry/curry.js +20 -18
- package/dist/curry/curry.js.map +1 -1
- package/dist/curry/curry.test.js +8 -9
- package/dist/curry/curry.test.js.map +1 -1
- package/dist/debounce/debounce.js +15 -19
- package/dist/debounce/debounce.js.map +1 -1
- package/dist/debounce/debounce.test.js +43 -46
- package/dist/debounce/debounce.test.js.map +1 -1
- package/dist/dec/dec.js +3 -3
- package/dist/dec/dec.js.map +1 -1
- package/dist/dec/dec.test.js +4 -3
- package/dist/dec/dec.test.js.map +1 -1
- package/dist/deep-equal/deep-equal.bench.js +100 -64
- package/dist/deep-equal/deep-equal.bench.js.map +1 -1
- package/dist/deep-equal/deep-equal.js +14 -16
- package/dist/deep-equal/deep-equal.js.map +1 -1
- package/dist/deep-equal/deep-equal.own.js +57 -78
- package/dist/deep-equal/deep-equal.own.js.map +1 -1
- package/dist/deep-equal/deep-equal.test.js +127 -82
- package/dist/deep-equal/deep-equal.test.js.map +1 -1
- package/dist/distinct/distinct.bench.js +46 -31
- package/dist/distinct/distinct.bench.js.map +1 -1
- package/dist/distinct/distinct.js +15 -24
- package/dist/distinct/distinct.js.map +1 -1
- package/dist/distinct/distinct.test.js +37 -14
- package/dist/distinct/distinct.test.js.map +1 -1
- package/dist/drop-last/drop-last.js +8 -12
- package/dist/drop-last/drop-last.js.map +1 -1
- package/dist/drop-last/drop-last.test.js +34 -8
- package/dist/drop-last/drop-last.test.js.map +1 -1
- package/dist/elapsed-time/elapsed-time.js +17 -18
- package/dist/elapsed-time/elapsed-time.js.map +1 -1
- package/dist/elapsed-time/elapsed-time.test.js +9 -8
- package/dist/elapsed-time/elapsed-time.test.js.map +1 -1
- package/dist/ends-with/ends-with.js +10 -16
- package/dist/ends-with/ends-with.js.map +1 -1
- package/dist/ends-with/ends-with.test.js +8 -7
- package/dist/ends-with/ends-with.test.js.map +1 -1
- package/dist/escape/escape.js +3 -4
- package/dist/escape/escape.js.map +1 -1
- package/dist/escape-html/escape-html.js +12 -11
- package/dist/escape-html/escape-html.js.map +1 -1
- package/dist/escape-html/escape-html.test.js +6 -5
- package/dist/escape-html/escape-html.test.js.map +1 -1
- package/dist/escape-reg-exp/escape-reg-exp.js +1 -2
- package/dist/escape-reg-exp/escape-reg-exp.js.map +1 -1
- package/dist/escape-reg-exp/escape-reg-exp.test.js +9 -8
- package/dist/escape-reg-exp/escape-reg-exp.test.js.map +1 -1
- package/dist/filter/filter.js +16 -21
- package/dist/filter/filter.js.map +1 -1
- package/dist/filter/filter.test.js +94 -57
- package/dist/filter/filter.test.js.map +1 -1
- package/dist/find/find.js +38 -50
- package/dist/find/find.js.map +1 -1
- package/dist/find/find.test.js +73 -64
- package/dist/find/find.test.js.map +1 -1
- package/dist/find-index/find-index.js +16 -20
- package/dist/find-index/find-index.js.map +1 -1
- package/dist/find-index/find-index.test.js +48 -38
- package/dist/find-index/find-index.test.js.map +1 -1
- package/dist/first/first.js +3 -3
- package/dist/first/first.js.map +1 -1
- package/dist/first/first.test.js +13 -8
- package/dist/first/first.test.js.map +1 -1
- package/dist/flatten/flatten.js +19 -34
- package/dist/flatten/flatten.js.map +1 -1
- package/dist/flatten/flatten.test.js +59 -24
- package/dist/flatten/flatten.test.js.map +1 -1
- package/dist/for-each/for-each.js +10 -12
- package/dist/for-each/for-each.js.map +1 -1
- package/dist/for-each/for-each.test.js +36 -16
- package/dist/for-each/for-each.test.js.map +1 -1
- package/dist/group-by/group-by.js +13 -17
- package/dist/group-by/group-by.js.map +1 -1
- package/dist/group-by/group-by.test.js +83 -49
- package/dist/group-by/group-by.test.js.map +1 -1
- package/dist/gt/gt.js +3 -6
- package/dist/gt/gt.js.map +1 -1
- package/dist/gt/gt.test.js +7 -6
- package/dist/gt/gt.test.js.map +1 -1
- package/dist/has-key/has-key.js +3 -4
- package/dist/has-key/has-key.js.map +1 -1
- package/dist/has-key/has-key.test.js +10 -9
- package/dist/has-key/has-key.test.js.map +1 -1
- package/dist/hist/hist.js +22 -34
- package/dist/hist/hist.js.map +1 -1
- package/dist/hist/hist.test.js +43 -28
- package/dist/hist/hist.test.js.map +1 -1
- package/dist/i/i.js +3 -3
- package/dist/i/i.js.map +1 -1
- package/dist/i/i.test.js +17 -12
- package/dist/i/i.test.js.map +1 -1
- package/dist/inc/inc.js +3 -3
- package/dist/inc/inc.js.map +1 -1
- package/dist/inc/inc.test.js +4 -3
- package/dist/inc/inc.test.js.map +1 -1
- package/dist/index-by/index-by.js +12 -17
- package/dist/index-by/index-by.js.map +1 -1
- package/dist/index-by/index-by.test.js +44 -36
- package/dist/index-by/index-by.test.js.map +1 -1
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +7 -7
- package/dist/index.test.js.map +1 -1
- package/dist/intersect/intersect.js +41 -54
- package/dist/intersect/intersect.js.map +1 -1
- package/dist/intersect/intersect.test.js +74 -38
- package/dist/intersect/intersect.test.js.map +1 -1
- package/dist/is/is.js +13 -20
- package/dist/is/is.js.map +1 -1
- package/dist/is/is.test.js +25 -25
- package/dist/is/is.test.js.map +1 -1
- package/dist/is-between/is-between.js +9 -13
- package/dist/is-between/is-between.js.map +1 -1
- package/dist/is-between/is-between.test.js +14 -13
- package/dist/is-between/is-between.test.js.map +1 -1
- package/dist/is-empty/is-empty.js +23 -44
- package/dist/is-empty/is-empty.js.map +1 -1
- package/dist/is-empty/is-empty.test.js +31 -27
- package/dist/is-empty/is-empty.test.js.map +1 -1
- package/dist/is-equal/is-equal.js +3 -6
- package/dist/is-equal/is-equal.js.map +1 -1
- package/dist/is-equal/is-equal.test.js +19 -15
- package/dist/is-equal/is-equal.test.js.map +1 -1
- package/dist/is-match/is-match.js +16 -25
- package/dist/is-match/is-match.js.map +1 -1
- package/dist/is-match/is-match.test.js +67 -64
- package/dist/is-match/is-match.test.js.map +1 -1
- package/dist/is-uri/is-uri.js +3 -4
- package/dist/is-uri/is-uri.js.map +1 -1
- package/dist/is-uri/is-uri.test.js +13 -13
- package/dist/is-uri/is-uri.test.js.map +1 -1
- package/dist/join/join.js +42 -53
- package/dist/join/join.js.map +1 -1
- package/dist/join/join.test.js +94 -40
- package/dist/join/join.test.js.map +1 -1
- package/dist/keys/keys.js +34 -24
- package/dist/keys/keys.js.map +1 -1
- package/dist/keys/keys.test.js +21 -9
- package/dist/keys/keys.test.js.map +1 -1
- package/dist/last/last.js +3 -4
- package/dist/last/last.js.map +1 -1
- package/dist/last/last.test.js +14 -7
- package/dist/last/last.test.js.map +1 -1
- package/dist/lt/lt.js +3 -4
- package/dist/lt/lt.js.map +1 -1
- package/dist/lt/lt.test.js +6 -5
- package/dist/lt/lt.test.js.map +1 -1
- package/dist/map/map.js +12 -15
- package/dist/map/map.js.map +1 -1
- package/dist/map/map.test.js +61 -21
- package/dist/map/map.test.js.map +1 -1
- package/dist/map-matrix/map-matrix.js +12 -19
- package/dist/map-matrix/map-matrix.js.map +1 -1
- package/dist/map-matrix/map-matrix.test.js +76 -16
- package/dist/map-matrix/map-matrix.test.js.map +1 -1
- package/dist/max/max.js +27 -39
- package/dist/max/max.js.map +1 -1
- package/dist/max/max.test.js +43 -23
- package/dist/max/max.test.js.map +1 -1
- package/dist/merge/merge.js +53 -63
- package/dist/merge/merge.js.map +1 -1
- package/dist/merge/merge.test.js +57 -49
- package/dist/merge/merge.test.js.map +1 -1
- package/dist/min/min.js +27 -39
- package/dist/min/min.js.map +1 -1
- package/dist/min/min.test.js +38 -22
- package/dist/min/min.test.js.map +1 -1
- package/dist/move/move.js +23 -37
- package/dist/move/move.js.map +1 -1
- package/dist/move/move.test.js +58 -15
- package/dist/move/move.test.js.map +1 -1
- package/dist/mutate/mutate.js +76 -84
- package/dist/mutate/mutate.js.map +1 -1
- package/dist/mutate/mutate.test.js +107 -89
- package/dist/mutate/mutate.test.js.map +1 -1
- package/dist/page/page.js +7 -14
- package/dist/page/page.js.map +1 -1
- package/dist/page/page.test.js +66 -15
- package/dist/page/page.test.js.map +1 -1
- package/dist/partition/partition.js +20 -26
- package/dist/partition/partition.js.map +1 -1
- package/dist/partition/partition.test.js +96 -35
- package/dist/partition/partition.test.js.map +1 -1
- package/dist/pick/pick.js +20 -26
- package/dist/pick/pick.js.map +1 -1
- package/dist/pick/pick.test.js +22 -12
- package/dist/pick/pick.test.js.map +1 -1
- package/dist/pipe/pipe.js +15 -14
- package/dist/pipe/pipe.js.map +1 -1
- package/dist/pipe/pipe.test.js +9 -11
- package/dist/pipe/pipe.test.js.map +1 -1
- package/dist/pipe-p/pipe-p.js +18 -21
- package/dist/pipe-p/pipe-p.js.map +1 -1
- package/dist/pipe-p/pipe-p.test.js +21 -24
- package/dist/pipe-p/pipe-p.test.js.map +1 -1
- package/dist/pluck/pluck.js +27 -38
- package/dist/pluck/pluck.js.map +1 -1
- package/dist/pluck/pluck.test.js +57 -37
- package/dist/pluck/pluck.test.js.map +1 -1
- package/dist/prepend/prepend.js +9 -11
- package/dist/prepend/prepend.js.map +1 -1
- package/dist/prepend/prepend.test.js +37 -7
- package/dist/prepend/prepend.test.js.map +1 -1
- package/dist/proto-chain/proto-chain.js +8 -8
- package/dist/proto-chain/proto-chain.js.map +1 -1
- package/dist/proto-chain/proto-chain.test.js +21 -20
- package/dist/proto-chain/proto-chain.test.js.map +1 -1
- package/dist/push/push.js +9 -12
- package/dist/push/push.js.map +1 -1
- package/dist/push/push.test.js +19 -8
- package/dist/push/push.test.js.map +1 -1
- package/dist/raise/raise.js +3 -3
- package/dist/raise/raise.js.map +1 -1
- package/dist/raise/raise.test.js +6 -5
- package/dist/raise/raise.test.js.map +1 -1
- package/dist/random/random.js +4 -5
- package/dist/random/random.js.map +1 -1
- package/dist/random/random.test.js +11 -12
- package/dist/random/random.test.js.map +1 -1
- package/dist/read/read.js +41 -48
- package/dist/read/read.js.map +1 -1
- package/dist/read/read.test.js +106 -60
- package/dist/read/read.test.js.map +1 -1
- package/dist/reduce/reduce.js +24 -29
- package/dist/reduce/reduce.js.map +1 -1
- package/dist/reduce/reduce.test.js +43 -32
- package/dist/reduce/reduce.test.js.map +1 -1
- package/dist/remove/remove.js +39 -50
- package/dist/remove/remove.js.map +1 -1
- package/dist/remove/remove.test.js +92 -54
- package/dist/remove/remove.test.js.map +1 -1
- package/dist/rename/rename.js +40 -63
- package/dist/rename/rename.js.map +1 -1
- package/dist/rename/rename.test.js +45 -39
- package/dist/rename/rename.test.js.map +1 -1
- package/dist/rename-file/rename-file.js +6 -11
- package/dist/rename-file/rename-file.js.map +1 -1
- package/dist/rename-file/rename-file.test.js +9 -8
- package/dist/rename-file/rename-file.test.js.map +1 -1
- package/dist/repeat/repeat.js +23 -30
- package/dist/repeat/repeat.js.map +1 -1
- package/dist/repeat/repeat.test.js +28 -11
- package/dist/repeat/repeat.test.js.map +1 -1
- package/dist/replace/replace.js +29 -42
- package/dist/replace/replace.js.map +1 -1
- package/dist/replace/replace.test.js +127 -82
- package/dist/replace/replace.test.js.map +1 -1
- package/dist/same/same.js +5 -5
- package/dist/same/same.js.map +1 -1
- package/dist/same/same.test.js +5 -4
- package/dist/same/same.test.js.map +1 -1
- package/dist/sequence/sequence.js +31 -40
- package/dist/sequence/sequence.js.map +1 -1
- package/dist/sequence/sequence.test.js +132 -80
- package/dist/sequence/sequence.test.js.map +1 -1
- package/dist/sort/sort-with.js +90 -98
- package/dist/sort/sort-with.js.map +1 -1
- package/dist/sort/sort.js +24 -32
- package/dist/sort/sort.js.map +1 -1
- package/dist/sort/sort.test.js +407 -294
- package/dist/sort/sort.test.js.map +1 -1
- package/dist/split/split.js +22 -29
- package/dist/split/split.js.map +1 -1
- package/dist/split/split.test.js +29 -12
- package/dist/split/split.test.js.map +1 -1
- package/dist/split-in-groups-of/split-in-groups-of.js +29 -38
- package/dist/split-in-groups-of/split-in-groups-of.js.map +1 -1
- package/dist/split-in-groups-of/split-in-groups-of.test.js +84 -15
- package/dist/split-in-groups-of/split-in-groups-of.test.js.map +1 -1
- package/dist/spy/spy.js +19 -22
- package/dist/spy/spy.js.map +1 -1
- package/dist/spy/spy.test.js +32 -28
- package/dist/spy/spy.test.js.map +1 -1
- package/dist/starts-with/starts-with.js +7 -12
- package/dist/starts-with/starts-with.js.map +1 -1
- package/dist/starts-with/starts-with.test.js +12 -8
- package/dist/starts-with/starts-with.test.js.map +1 -1
- package/dist/throttle/throttle.js +24 -31
- package/dist/throttle/throttle.js.map +1 -1
- package/dist/throttle/throttle.test.js +35 -37
- package/dist/throttle/throttle.test.js.map +1 -1
- package/dist/to-lower/to-lower.js +3 -3
- package/dist/to-lower/to-lower.js.map +1 -1
- package/dist/to-lower/to-lower.test.js +5 -4
- package/dist/to-lower/to-lower.test.js.map +1 -1
- package/dist/to-upper/to-upper.js +3 -3
- package/dist/to-upper/to-upper.js.map +1 -1
- package/dist/to-upper/to-upper.test.js +5 -4
- package/dist/to-upper/to-upper.test.js.map +1 -1
- package/dist/toggle/toggle.js +9 -11
- package/dist/toggle/toggle.js.map +1 -1
- package/dist/toggle/toggle.test.js +24 -5
- package/dist/toggle/toggle.test.js.map +1 -1
- package/dist/top/top.js +23 -35
- package/dist/top/top.js.map +1 -1
- package/dist/top/top.test.js +47 -13
- package/dist/top/top.test.js.map +1 -1
- package/dist/trim/trim.js +19 -26
- package/dist/trim/trim.js.map +1 -1
- package/dist/trim/trim.test.js +6 -5
- package/dist/trim/trim.test.js.map +1 -1
- package/dist/try-catch/try-catch.js +15 -14
- package/dist/try-catch/try-catch.js.map +1 -1
- package/dist/try-catch/try-catch.test.js +9 -8
- package/dist/try-catch/try-catch.test.js.map +1 -1
- package/dist/type/type.js +3 -4
- package/dist/type/type.js.map +1 -1
- package/dist/type/type.test.js +16 -16
- package/dist/type/type.test.js.map +1 -1
- package/dist/unite/unite.js +3 -6
- package/dist/unite/unite.js.map +1 -1
- package/dist/unite/unite.test.js +8 -3
- package/dist/unite/unite.test.js.map +1 -1
- package/dist/update/update.js +74 -81
- package/dist/update/update.js.map +1 -1
- package/dist/update/update.test.js +92 -79
- package/dist/update/update.test.js.map +1 -1
- package/dist/upsert/upsert.js +14 -18
- package/dist/upsert/upsert.js.map +1 -1
- package/dist/upsert/upsert.test.js +57 -42
- package/dist/upsert/upsert.test.js.map +1 -1
- package/dist/values/values.js +38 -29
- package/dist/values/values.js.map +1 -1
- package/dist/values/values.test.js +21 -9
- package/dist/values/values.test.js.map +1 -1
- package/dist/when/when.js +27 -37
- package/dist/when/when.js.map +1 -1
- package/dist/when/when.test.js +23 -15
- package/dist/when/when.test.js.map +1 -1
- package/dist/write/write.js +6 -12
- package/dist/write/write.js.map +1 -1
- package/dist/write/write.test.js +14 -13
- package/dist/write/write.test.js.map +1 -1
- package/dist/zip-to-object/zip-to-object.js +8 -11
- package/dist/zip-to-object/zip-to-object.js.map +1 -1
- package/dist/zip-to-object/zip-to-object.test.js +29 -12
- package/dist/zip-to-object/zip-to-object.test.js.map +1 -1
- package/package.json +41 -38
package/dist/i/i.test.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import test from "tape";
|
|
2
2
|
import { i } from "./i.js";
|
|
3
|
-
test("i", function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
test("i", function(t) {
|
|
4
|
+
t.equals(i(true), true, "Identity boolean");
|
|
5
|
+
t.equals(i(3), 3, "Identity string");
|
|
6
|
+
t.equals(i("asd"), "asd", "Identity string");
|
|
7
|
+
var array = [
|
|
8
|
+
1,
|
|
9
|
+
2,
|
|
10
|
+
3
|
|
11
|
+
];
|
|
12
|
+
t.equals(i(array), array, "Identity array");
|
|
13
|
+
var object = {
|
|
14
|
+
a: 1,
|
|
15
|
+
b: 2
|
|
16
|
+
};
|
|
17
|
+
t.equals(i(object), object, "Identity object");
|
|
18
|
+
t.end();
|
|
15
19
|
});
|
|
20
|
+
|
|
16
21
|
//# sourceMappingURL=i.test.js.map
|
package/dist/i/i.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i/i.test.js"],"
|
|
1
|
+
{"version":3,"sources":["../../src/i/i.test.js"],"sourcesContent":["import test from \"tape\"\n\nimport { i } from \"./i.js\"\n\ntest(\"i\", t => {\n t.equals(i(true), true, \"Identity boolean\")\n t.equals(i(3), 3, \"Identity string\")\n t.equals(i(\"asd\"), \"asd\", \"Identity string\")\n\n const array = [1, 2, 3]\n\n t.equals(i(array), array, \"Identity array\")\n\n const object = { a: 1, b: 2 }\n\n t.equals(i(object), object, \"Identity object\")\n\n t.end()\n})\n"],"names":["test","i","t","equals","array","object","a","b","end"],"mappings":"AAAA,MAAM,CAACA,IAAI,MAAM,CAAM;AAEvB,MAAM,GAAGC,CAAC,QAAQ,CAAQ;AAE1BD,IAAI,CAAC,CAAG,IAAEE,QACT,CADSA,CAAC,EAAI,CAAC;IACdA,CAAC,CAACC,MAAM,CAACF,CAAC,CAAC,IAAI,GAAG,IAAI,EAAE,CAAkB;IAC1CC,CAAC,CAACC,MAAM,CAACF,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAiB;IACnCC,CAAC,CAACC,MAAM,CAACF,CAAC,CAAC,CAAK,OAAG,CAAK,MAAE,CAAiB;IAE3C,GAAK,CAACG,KAAK,GAAG,CAAC;AAAA,SAAC;AAAE,SAAC;AAAE,SAAC;IAAA,CAAC;IAEvBF,CAAC,CAACC,MAAM,CAACF,CAAC,CAACG,KAAK,GAAGA,KAAK,EAAE,CAAgB;IAE1C,GAAK,CAACC,MAAM,GAAG,CAAC;QAACC,CAAC,EAAE,CAAC;QAAEC,CAAC,EAAE,CAAC;IAAC,CAAC;IAE7BL,CAAC,CAACC,MAAM,CAACF,CAAC,CAACI,MAAM,GAAGA,MAAM,EAAE,CAAiB;IAE7CH,CAAC,CAACM,GAAG;AACP,CAAC"}
|
package/dist/inc/inc.js
CHANGED
package/dist/inc/inc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/inc/inc.js"],"
|
|
1
|
+
{"version":3,"sources":["../../src/inc/inc.js"],"sourcesContent":["/**\n * Add one\n *\n * @param {number} input Source input\n *\n * @returns {number}\n *\n * @tag Number\n * @signature (source: number): number\n *\n * @example\n * inc(2)\n * // => 3\n */\nexport const inc = input => input + 1\n"],"names":["inc","input"],"mappings":"AAAA,EAaG,AAbH;;;;;;;;;;;;;CAaG,AAbH,EAaG,CACH,MAAM,CAAC,GAAK,CAACA,GAAG,GAAGC,QAAQ,CAARA,KAAK;IAAIA,MAAM,CAANA,KAAK,GAAG,CAAC"}
|
package/dist/inc/inc.test.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import test from "tape";
|
|
2
2
|
import { inc } from "./inc.js";
|
|
3
|
-
test("inc", function
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
test("inc", function(t) {
|
|
4
|
+
t.equal(inc(2), 3, "Increment number");
|
|
5
|
+
t.end();
|
|
6
6
|
});
|
|
7
|
+
|
|
7
8
|
//# sourceMappingURL=inc.test.js.map
|
package/dist/inc/inc.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/inc/inc.test.js"],"
|
|
1
|
+
{"version":3,"sources":["../../src/inc/inc.test.js"],"sourcesContent":["import test from \"tape\"\n\nimport { inc } from \"./inc.js\"\n\ntest(\"inc\", t => {\n t.equal(inc(2), 3, \"Increment number\")\n\n t.end()\n})\n"],"names":["test","inc","t","equal","end"],"mappings":"AAAA,MAAM,CAACA,IAAI,MAAM,CAAM;AAEvB,MAAM,GAAGC,GAAG,QAAQ,CAAU;AAE9BD,IAAI,CAAC,CAAK,MAAEE,QACX,CADWA,CAAC,EAAI,CAAC;IAChBA,CAAC,CAACC,KAAK,CAACF,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAkB;IAErCC,CAAC,CAACE,GAAG;AACP,CAAC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { curry } from "../curry/curry.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return result;
|
|
15
|
-
};
|
|
2
|
+
var _indexBy = function(field) {
|
|
3
|
+
return function(input) {
|
|
4
|
+
var result = {};
|
|
5
|
+
for(var i = 0, length = input.length; i < length; i++){
|
|
6
|
+
if (input[i][field]) {
|
|
7
|
+
var indexKey = String(input[i][field]);
|
|
8
|
+
result[indexKey] = input[i];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
16
13
|
};
|
|
17
14
|
/**
|
|
18
15
|
* Index an array of objects by field. Only truthy fields will be indexed.
|
|
@@ -34,8 +31,6 @@ var _indexBy = function _indexBy(field) {
|
|
|
34
31
|
* // 1: {id: 1, user_id: 2},
|
|
35
32
|
* // 2: {id: 2, user_id: 3},
|
|
36
33
|
* // }
|
|
37
|
-
*/
|
|
38
|
-
|
|
34
|
+
*/ export var indexBy = curry(_indexBy);
|
|
39
35
|
|
|
40
|
-
export var indexBy = curry(_indexBy);
|
|
41
36
|
//# sourceMappingURL=index-by.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index-by/index-by.js"],"
|
|
1
|
+
{"version":3,"sources":["../../src/index-by/index-by.js"],"sourcesContent":["import { curry } from \"../curry/curry.js\"\n\nconst _indexBy = field => input => {\n const result = {}\n\n for (let i = 0, length = input.length; i < length; i++) {\n if (input[i][field]) {\n const indexKey = String(input[i][field])\n\n result[indexKey] = input[i]\n }\n }\n\n return result\n}\n\n/**\n * Index an array of objects by field. Only truthy fields will be indexed.\n *\n * @param {string} field The field to index by\n * @param {Array} source Input\n *\n * @returns {object}\n *\n * @tag Array\n * @signature (field: string, source: Object[]): Object\n *\n * @example\n * indexBy(\"id\")([\n * {id: 1, user_id: 2},\n * {id: 2, user_id: 3},\n * ])\n * // => {\n * // 1: {id: 1, user_id: 2},\n * // 2: {id: 2, user_id: 3},\n * // }\n */\nexport const indexBy = curry(_indexBy)\n"],"names":["curry","_indexBy","field","input","result","i","length","indexKey","String","indexBy"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAQ,CAAmB;AAEzC,GAAK,CAACC,QAAQ,GAAGC,QAAQ,CAARA,KAAK;IAAIC,MAAM,CAANA,QAAQ,CAARA,KAAK,EAAI,CAAC;QAClC,GAAK,CAACC,MAAM,GAAG,CAAC,CAAC;QAEjB,GAAG,CAAE,GAAG,CAACC,CAAC,GAAG,CAAC,EAAEC,MAAM,GAAGH,KAAK,CAACG,MAAM,EAAED,CAAC,GAAGC,MAAM,EAAED,CAAC,GAAI,CAAC;YACvD,EAAE,EAAEF,KAAK,CAACE,CAAC,EAAEH,KAAK,GAAG,CAAC;gBACpB,GAAK,CAACK,QAAQ,GAAGC,MAAM,CAACL,KAAK,CAACE,CAAC,EAAEH,KAAK;gBAEtCE,MAAM,CAACG,QAAQ,IAAIJ,KAAK,CAACE,CAAC;YAC5B,CAAC;QACH,CAAC;QAED,MAAM,CAACD,MAAM;IACf,CAAC;;AAED,EAoBG,AApBH;;;;;;;;;;;;;;;;;;;;CAoBG,AApBH,EAoBG,CACH,MAAM,CAAC,GAAK,CAACK,OAAO,GAAGT,KAAK,CAACC,QAAQ"}
|
|
@@ -1,40 +1,48 @@
|
|
|
1
1
|
import test from "tape";
|
|
2
2
|
import { indexBy } from "./index-by.js";
|
|
3
|
-
test("indexBy", function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
3
|
+
test("indexBy", function(t) {
|
|
4
|
+
t.deepEqual(indexBy("id")([
|
|
5
|
+
{
|
|
6
|
+
id: 1,
|
|
7
|
+
label: "test"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: 2,
|
|
11
|
+
label: "foo"
|
|
12
|
+
},
|
|
13
|
+
]), {
|
|
14
|
+
1: {
|
|
15
|
+
id: 1,
|
|
16
|
+
label: "test"
|
|
17
|
+
},
|
|
18
|
+
2: {
|
|
19
|
+
id: 2,
|
|
20
|
+
label: "foo"
|
|
21
|
+
}
|
|
22
|
+
}, "index object array by existing field");
|
|
23
|
+
t.deepEqual(indexBy("id")([
|
|
24
|
+
{
|
|
25
|
+
id: 1,
|
|
26
|
+
label: "test"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 2,
|
|
30
|
+
label: "foo"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "foo bar"
|
|
34
|
+
},
|
|
35
|
+
]), {
|
|
36
|
+
1: {
|
|
37
|
+
id: 1,
|
|
38
|
+
label: "test"
|
|
39
|
+
},
|
|
40
|
+
2: {
|
|
41
|
+
id: 2,
|
|
42
|
+
label: "foo"
|
|
43
|
+
}
|
|
44
|
+
}, "index object array by existing field");
|
|
45
|
+
t.end();
|
|
39
46
|
});
|
|
47
|
+
|
|
40
48
|
//# sourceMappingURL=index-by.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index-by/index-by.test.js"],"
|
|
1
|
+
{"version":3,"sources":["../../src/index-by/index-by.test.js"],"sourcesContent":["import test from \"tape\"\n\nimport { indexBy } from \"./index-by.js\"\n\ntest(\"indexBy\", t => {\n t.deepEqual(\n indexBy(\"id\")([\n { id: 1, label: \"test\" },\n { id: 2, label: \"foo\" },\n ]),\n {\n 1: { id: 1, label: \"test\" },\n 2: { id: 2, label: \"foo\" },\n },\n \"index object array by existing field\"\n )\n\n t.deepEqual(\n indexBy(\"id\")([\n { id: 1, label: \"test\" },\n { id: 2, label: \"foo\" },\n { label: \"foo bar\" },\n ]),\n {\n 1: { id: 1, label: \"test\" },\n 2: { id: 2, label: \"foo\" },\n },\n \"index object array by existing field\"\n )\n\n t.end()\n})\n"],"names":["test","indexBy","t","deepEqual","id","label","end"],"mappings":"AAAA,MAAM,CAACA,IAAI,MAAM,CAAM;AAEvB,MAAM,GAAGC,OAAO,QAAQ,CAAe;AAEvCD,IAAI,CAAC,CAAS,UAAEE,QACf,CADeA,CAAC,EAAI,CAAC;IACpBA,CAAC,CAACC,SAAS,CACTF,OAAO,CAAC,CAAI,KAAE,CAAC;QACb,CAAC;YAACG,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAM;QAAC,CAAC;QACxB,CAAC;YAACD,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAK;QAAC,CAAC;IACzB,CAAC,GACD,CAAC;AACC,SAAC,EAAE,CAAC;YAACD,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAM;QAAC,CAAC;AAC3B,SAAC,EAAE,CAAC;YAACD,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAK;QAAC,CAAC;IAC5B,CAAC,EACD,CAAsC;IAGxCH,CAAC,CAACC,SAAS,CACTF,OAAO,CAAC,CAAI,KAAE,CAAC;QACb,CAAC;YAACG,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAM;QAAC,CAAC;QACxB,CAAC;YAACD,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAK;QAAC,CAAC;QACvB,CAAC;YAACA,KAAK,EAAE,CAAS;QAAC,CAAC;IACtB,CAAC,GACD,CAAC;AACC,SAAC,EAAE,CAAC;YAACD,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAM;QAAC,CAAC;AAC3B,SAAC,EAAE,CAAC;YAACD,EAAE,EAAE,CAAC;YAAEC,KAAK,EAAE,CAAK;QAAC,CAAC;IAC5B,CAAC,EACD,CAAsC;IAGxCH,CAAC,CAACI,GAAG;AACP,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,8 +11,8 @@ export { type } from "./type/type.js";
|
|
|
11
11
|
export { throttle } from "./throttle/throttle.js";
|
|
12
12
|
export { debounce } from "./debounce/debounce.js";
|
|
13
13
|
export { isURI } from "./is-uri/is-uri.js";
|
|
14
|
-
export { spy } from "./spy/spy.js";
|
|
15
|
-
|
|
14
|
+
export { spy } from "./spy/spy.js";
|
|
15
|
+
// Core
|
|
16
16
|
export { map } from "./map/map.js";
|
|
17
17
|
export { mapMatrix } from "./map-matrix/map-matrix.js";
|
|
18
18
|
export { reduce } from "./reduce/reduce.js";
|
|
@@ -27,8 +27,8 @@ export { i } from "./i/i.js";
|
|
|
27
27
|
export { clone } from "./clone/clone.js";
|
|
28
28
|
export { repeat } from "./repeat/repeat.js";
|
|
29
29
|
export { curry } from "./curry/curry.js";
|
|
30
|
-
export { compact, compactMany } from "./compact/compact.js";
|
|
31
|
-
|
|
30
|
+
export { compact, compactMany } from "./compact/compact.js";
|
|
31
|
+
// Boolean
|
|
32
32
|
export { is, isNothing, not, isTrue, isFalse, isObject } from "./is/is.js";
|
|
33
33
|
export { isEmpty, isNotEmpty } from "./is-empty/is-empty.js";
|
|
34
34
|
export { isEqual, isEqual as equals, isEqual as eq } from "./is-equal/is-equal.js";
|
|
@@ -37,8 +37,8 @@ export { any, any as has, anyWith, anyWith as hasWith } from "./any/any.js";
|
|
|
37
37
|
export { all, allWith } from "./all/all.js";
|
|
38
38
|
export { when } from "./when/when.js";
|
|
39
39
|
export { cases } from "./cases/cases.js";
|
|
40
|
-
export { isMatch } from "./is-match/is-match.js";
|
|
41
|
-
|
|
40
|
+
export { isMatch } from "./is-match/is-match.js";
|
|
41
|
+
// Object
|
|
42
42
|
export { pick } from "./pick/pick.js";
|
|
43
43
|
export { pluck } from "./pluck/pluck.js";
|
|
44
44
|
export { merge, mergeAll, mergeBy } from "./merge/merge.js";
|
|
@@ -47,8 +47,8 @@ export { values } from "./values/values.js";
|
|
|
47
47
|
export { rename as renameKeys, rename, renameMany } from "./rename/rename.js";
|
|
48
48
|
export { zipToObject as zipToObj, zipToObject } from "./zip-to-object/zip-to-object.js";
|
|
49
49
|
export { mutate, mutateMany, mutateWith } from "./mutate/mutate.js";
|
|
50
|
-
export { update, updateMany, updateWith } from "./update/update.js";
|
|
51
|
-
|
|
50
|
+
export { update, updateMany, updateWith } from "./update/update.js";
|
|
51
|
+
// Array
|
|
52
52
|
export { top } from "./top/top.js";
|
|
53
53
|
export { bottom } from "./bottom/bottom.js";
|
|
54
54
|
export { first, first as head } from "./first/first.js";
|
|
@@ -76,14 +76,14 @@ export { filter, filterWith } from "./filter/filter.js";
|
|
|
76
76
|
export { find, findWith } from "./find/find.js";
|
|
77
77
|
export { findIndex, findIndexWith } from "./find-index/find-index.js";
|
|
78
78
|
export { join, joinBy } from "./join/join.js";
|
|
79
|
-
export { intersect, intersectBy } from "./intersect/intersect.js";
|
|
80
|
-
|
|
79
|
+
export { intersect, intersectBy } from "./intersect/intersect.js";
|
|
80
|
+
// Number
|
|
81
81
|
export { dec } from "./dec/dec.js";
|
|
82
82
|
export { inc } from "./inc/inc.js";
|
|
83
83
|
export { gt } from "./gt/gt.js";
|
|
84
84
|
export { lt } from "./lt/lt.js";
|
|
85
|
-
export { random } from "./random/random.js";
|
|
86
|
-
|
|
85
|
+
export { random } from "./random/random.js";
|
|
86
|
+
// String
|
|
87
87
|
export { split } from "./split/split.js";
|
|
88
88
|
export { splitInGroupsOf } from "./split-in-groups-of/split-in-groups-of.js";
|
|
89
89
|
export { startsWith } from "./starts-with/starts-with.js";
|
|
@@ -95,4 +95,5 @@ export { contains } from "./contains/contains.js";
|
|
|
95
95
|
export { unite } from "./unite/unite.js";
|
|
96
96
|
export { escapeHTML } from "./escape-html/escape-html.js";
|
|
97
97
|
export { escapeRegExp } from "./escape-reg-exp/escape-reg-exp.js";
|
|
98
|
+
|
|
98
99
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["isDeepEqual","deepEqual","elapsedTime","groupBy","indexBy","hist","protoChain","sequence","sequenceWhile","tryCatch","raise","type","throttle","debounce","isURI","spy","map","mapMatrix","reduce","converge","forEach","pipe","pipeP","read","get","readMany","write","set","same","i","clone","repeat","curry","compact","compactMany","is","isNothing","not","isTrue","isFalse","isObject","isEmpty","isNotEmpty","isEqual","equals","eq","isBetween","between","any","has","anyWith","hasWith","all","allWith","when","cases","isMatch","pick","pluck","merge","mergeAll","mergeBy","keys","values","rename","renameKeys","renameMany","zipToObject","zipToObj","mutate","mutateMany","mutateWith","update","updateMany","updateWith","top","bottom","first","head","last","tail","page","push","max","maxBy","min","minBy","move","flatten","distinct","distinctBy","dropLast","upsertWith","upsert","append","concat","prepend","toggle","partition","partitionWith","count","length","size","countBy","countWith","replace","replaceWith","sort","sortBy","sortWith","remove","removeWith","hasKey","filter","filterWith","find","findWith","findIndex","findIndexWith","join","joinBy","intersect","intersectBy","dec","inc","gt","lt","random","split","splitInGroupsOf","startsWith","endsWith","toLower","toUpper","trim","contains","unite","escapeHTML","escapeRegExp"],"mappings":"AAAA,SACEA,WADF,EAEEA,WAAW,IAAIC,SAFjB,QAGO,4BAHP;AAIA,SAASC,WAAT,QAA4B,gCAA5B;AACA,SAASC,OAAT,QAAwB,wBAAxB;AACA,SAASC,OAAT,QAAwB,wBAAxB;AACA,SAASC,IAAT,QAAqB,gBAArB;AACA,SAASC,UAAT,QAA2B,8BAA3B;AACA,SAASC,QAAT,EAAmBC,aAAnB,QAAwC,wBAAxC;AACA,SAASC,QAAT,QAAyB,0BAAzB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,IAAT,QAAqB,gBAArB;AACA,SAASC,QAAT,QAAyB,wBAAzB;AACA,SAASC,QAAT,QAAyB,wBAAzB;AACA,SAASC,KAAT,QAAsB,oBAAtB;AACA,SAASC,GAAT,QAAoB,cAApB,C,CA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ACA,SAASC,IAAT,EAAeC,MAAf,QAA6B,gBAA7B;AACA,SAASC,QAAT,QAAyB,qBAAzB;AACA,SAASC,MAAT,EAAiBC,UAAjB,QAAmC,oBAAnC;AACA,SAASC,MAAT,QAAuB,sBAAvB;AACA,SAASC,MAAT,EAAiBC,UAAjB,QAAmC,oBAAnC;AACA,SAASC,IAAT,EAAeC,QAAf,QAA+B,gBAA/B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,4BAAzC;AACA,SAASC,IAAT,EAAeC,MAAf,QAA6B,gBAA7B;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,0BAAvC,C,CAEA;;AACA,SAASC,GAAT,QAAoB,cAApB;AACA,SAASC,GAAT,QAAoB,cAApB;AACA,SAASC,EAAT,QAAmB,YAAnB;AACA,SAASC,EAAT,QAAmB,YAAnB;AACA,SAASC,MAAT,QAAuB,oBAAvB,C,CAEA;;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,eAAT,QAAgC,4CAAhC;AACA,SAASC,UAAT,QAA2B,8BAA3B;AACA,SAASC,QAAT,QAAyB,0BAAzB;AACA,SAASC,OAAT,QAAwB,wBAAxB;AACA,SAASC,OAAT,QAAwB,wBAAxB;AACA,SAASC,IAAT,QAAqB,gBAArB;AACA,SAASC,QAAT,QAAyB,wBAAzB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,UAAT,QAA2B,8BAA3B;AACA,SAASC,YAAT,QAA6B,oCAA7B","sourcesContent":["export {\n isDeepEqual,\n isDeepEqual as deepEqual,\n} from \"./deep-equal/deep-equal.js\"\nexport { elapsedTime } from \"./elapsed-time/elapsed-time.js\"\nexport { groupBy } from \"./group-by/group-by.js\"\nexport { indexBy } from \"./index-by/index-by.js\"\nexport { hist } from \"./hist/hist.js\"\nexport { protoChain } from \"./proto-chain/proto-chain.js\"\nexport { sequence, sequenceWhile } from \"./sequence/sequence.js\"\nexport { tryCatch } from \"./try-catch/try-catch.js\"\nexport { raise } from \"./raise/raise.js\"\nexport { type } from \"./type/type.js\"\nexport { throttle } from \"./throttle/throttle.js\"\nexport { debounce } from \"./debounce/debounce.js\"\nexport { isURI } from \"./is-uri/is-uri.js\"\nexport { spy } from \"./spy/spy.js\"\n\n// Core\nexport { map } from \"./map/map.js\"\nexport { mapMatrix } from \"./map-matrix/map-matrix.js\"\nexport { reduce } from \"./reduce/reduce.js\"\nexport { converge } from \"./converge/converge.js\"\nexport { forEach } from \"./for-each/for-each.js\"\nexport { pipe } from \"./pipe/pipe.js\"\nexport { pipeP } from \"./pipe-p/pipe-p.js\"\nexport { read as get, read, readMany } from \"./read/read.js\"\nexport { write as set, write } from \"./write/write.js\"\nexport { same } from \"./same/same.js\"\nexport { i } from \"./i/i.js\"\nexport { clone } from \"./clone/clone.js\"\nexport { repeat } from \"./repeat/repeat.js\"\nexport { curry } from \"./curry/curry.js\"\nexport { compact, compactMany } from \"./compact/compact.js\"\n\n// Boolean\nexport { is, isNothing, not, isTrue, isFalse, isObject } from \"./is/is.js\"\nexport { isEmpty, isNotEmpty } from \"./is-empty/is-empty.js\"\nexport {\n isEqual,\n isEqual as equals,\n isEqual as eq,\n} from \"./is-equal/is-equal.js\"\nexport { isBetween, isBetween as between } from \"./is-between/is-between.js\"\nexport { any, any as has, anyWith, anyWith as hasWith } from \"./any/any.js\"\nexport { all, allWith } from \"./all/all.js\"\nexport { when } from \"./when/when.js\"\nexport { cases } from \"./cases/cases.js\"\nexport { isMatch } from \"./is-match/is-match.js\"\n\n// Object\nexport { pick } from \"./pick/pick.js\"\nexport { pluck } from \"./pluck/pluck.js\"\nexport { merge, mergeAll, mergeBy } from \"./merge/merge.js\"\nexport { keys } from \"./keys/keys.js\"\nexport { values } from \"./values/values.js\"\nexport { rename as renameKeys, rename, renameMany } from \"./rename/rename.js\"\nexport {\n zipToObject as zipToObj,\n zipToObject,\n} from \"./zip-to-object/zip-to-object.js\"\nexport { mutate, mutateMany, mutateWith } from \"./mutate/mutate.js\"\nexport { update, updateMany, updateWith } from \"./update/update.js\"\n\n// Array\nexport { top } from \"./top/top.js\"\nexport { bottom } from \"./bottom/bottom.js\"\nexport { first, first as head } from \"./first/first.js\"\nexport { last, last as tail } from \"./last/last.js\"\nexport { page } from \"./page/page.js\"\nexport { push } from \"./push/push.js\"\nexport { max, maxBy } from \"./max/max.js\"\nexport { min, minBy } from \"./min/min.js\"\nexport { move } from \"./move/move.js\"\nexport { flatten } from \"./flatten/flatten.js\"\nexport { distinct, distinctBy } from \"./distinct/distinct.js\"\nexport { dropLast } from \"./drop-last/drop-last.js\"\nexport { upsertWith as upsert, upsertWith } from \"./upsert/upsert.js\"\nexport { append, append as concat } from \"./append/append.js\"\nexport { prepend } from \"./prepend/prepend.js\"\nexport { toggle } from \"./toggle/toggle.js\"\nexport { partition, partitionWith } from \"./partition/partition.js\"\nexport {\n count,\n count as length,\n count as size,\n countBy,\n countWith,\n} from \"./count/count.js\"\nexport { replace, replaceWith } from \"./replace/replace.js\"\nexport { sort, sortBy } from \"./sort/sort.js\"\nexport { sortWith } from \"./sort/sort-with.js\"\nexport { remove, removeWith } from \"./remove/remove.js\"\nexport { hasKey } from \"./has-key/has-key.js\"\nexport { filter, filterWith } from \"./filter/filter.js\"\nexport { find, findWith } from \"./find/find.js\"\nexport { findIndex, findIndexWith } from \"./find-index/find-index.js\"\nexport { join, joinBy } from \"./join/join.js\"\nexport { intersect, intersectBy } from \"./intersect/intersect.js\"\n\n// Number\nexport { dec } from \"./dec/dec.js\"\nexport { inc } from \"./inc/inc.js\"\nexport { gt } from \"./gt/gt.js\"\nexport { lt } from \"./lt/lt.js\"\nexport { random } from \"./random/random.js\"\n\n// String\nexport { split } from \"./split/split.js\"\nexport { splitInGroupsOf } from \"./split-in-groups-of/split-in-groups-of.js\"\nexport { startsWith } from \"./starts-with/starts-with.js\"\nexport { endsWith } from \"./ends-with/ends-with.js\"\nexport { toLower } from \"./to-lower/to-lower.js\"\nexport { toUpper } from \"./to-upper/to-upper.js\"\nexport { trim } from \"./trim/trim.js\"\nexport { contains } from \"./contains/contains.js\"\nexport { unite } from \"./unite/unite.js\"\nexport { escapeHTML } from \"./escape-html/escape-html.js\"\nexport { escapeRegExp } from \"./escape-reg-exp/escape-reg-exp.js\"\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"sourcesContent":["export {\n isDeepEqual,\n isDeepEqual as deepEqual,\n} from \"./deep-equal/deep-equal.js\"\nexport { elapsedTime } from \"./elapsed-time/elapsed-time.js\"\nexport { groupBy } from \"./group-by/group-by.js\"\nexport { indexBy } from \"./index-by/index-by.js\"\nexport { hist } from \"./hist/hist.js\"\nexport { protoChain } from \"./proto-chain/proto-chain.js\"\nexport { sequence, sequenceWhile } from \"./sequence/sequence.js\"\nexport { tryCatch } from \"./try-catch/try-catch.js\"\nexport { raise } from \"./raise/raise.js\"\nexport { type } from \"./type/type.js\"\nexport { throttle } from \"./throttle/throttle.js\"\nexport { debounce } from \"./debounce/debounce.js\"\nexport { isURI } from \"./is-uri/is-uri.js\"\nexport { spy } from \"./spy/spy.js\"\n\n// Core\nexport { map } from \"./map/map.js\"\nexport { mapMatrix } from \"./map-matrix/map-matrix.js\"\nexport { reduce } from \"./reduce/reduce.js\"\nexport { converge } from \"./converge/converge.js\"\nexport { forEach } from \"./for-each/for-each.js\"\nexport { pipe } from \"./pipe/pipe.js\"\nexport { pipeP } from \"./pipe-p/pipe-p.js\"\nexport { read as get, read, readMany } from \"./read/read.js\"\nexport { write as set, write } from \"./write/write.js\"\nexport { same } from \"./same/same.js\"\nexport { i } from \"./i/i.js\"\nexport { clone } from \"./clone/clone.js\"\nexport { repeat } from \"./repeat/repeat.js\"\nexport { curry } from \"./curry/curry.js\"\nexport { compact, compactMany } from \"./compact/compact.js\"\n\n// Boolean\nexport { is, isNothing, not, isTrue, isFalse, isObject } from \"./is/is.js\"\nexport { isEmpty, isNotEmpty } from \"./is-empty/is-empty.js\"\nexport {\n isEqual,\n isEqual as equals,\n isEqual as eq,\n} from \"./is-equal/is-equal.js\"\nexport { isBetween, isBetween as between } from \"./is-between/is-between.js\"\nexport { any, any as has, anyWith, anyWith as hasWith } from \"./any/any.js\"\nexport { all, allWith } from \"./all/all.js\"\nexport { when } from \"./when/when.js\"\nexport { cases } from \"./cases/cases.js\"\nexport { isMatch } from \"./is-match/is-match.js\"\n\n// Object\nexport { pick } from \"./pick/pick.js\"\nexport { pluck } from \"./pluck/pluck.js\"\nexport { merge, mergeAll, mergeBy } from \"./merge/merge.js\"\nexport { keys } from \"./keys/keys.js\"\nexport { values } from \"./values/values.js\"\nexport { rename as renameKeys, rename, renameMany } from \"./rename/rename.js\"\nexport {\n zipToObject as zipToObj,\n zipToObject,\n} from \"./zip-to-object/zip-to-object.js\"\nexport { mutate, mutateMany, mutateWith } from \"./mutate/mutate.js\"\nexport { update, updateMany, updateWith } from \"./update/update.js\"\n\n// Array\nexport { top } from \"./top/top.js\"\nexport { bottom } from \"./bottom/bottom.js\"\nexport { first, first as head } from \"./first/first.js\"\nexport { last, last as tail } from \"./last/last.js\"\nexport { page } from \"./page/page.js\"\nexport { push } from \"./push/push.js\"\nexport { max, maxBy } from \"./max/max.js\"\nexport { min, minBy } from \"./min/min.js\"\nexport { move } from \"./move/move.js\"\nexport { flatten } from \"./flatten/flatten.js\"\nexport { distinct, distinctBy } from \"./distinct/distinct.js\"\nexport { dropLast } from \"./drop-last/drop-last.js\"\nexport { upsertWith as upsert, upsertWith } from \"./upsert/upsert.js\"\nexport { append, append as concat } from \"./append/append.js\"\nexport { prepend } from \"./prepend/prepend.js\"\nexport { toggle } from \"./toggle/toggle.js\"\nexport { partition, partitionWith } from \"./partition/partition.js\"\nexport {\n count,\n count as length,\n count as size,\n countBy,\n countWith,\n} from \"./count/count.js\"\nexport { replace, replaceWith } from \"./replace/replace.js\"\nexport { sort, sortBy } from \"./sort/sort.js\"\nexport { sortWith } from \"./sort/sort-with.js\"\nexport { remove, removeWith } from \"./remove/remove.js\"\nexport { hasKey } from \"./has-key/has-key.js\"\nexport { filter, filterWith } from \"./filter/filter.js\"\nexport { find, findWith } from \"./find/find.js\"\nexport { findIndex, findIndexWith } from \"./find-index/find-index.js\"\nexport { join, joinBy } from \"./join/join.js\"\nexport { intersect, intersectBy } from \"./intersect/intersect.js\"\n\n// Number\nexport { dec } from \"./dec/dec.js\"\nexport { inc } from \"./inc/inc.js\"\nexport { gt } from \"./gt/gt.js\"\nexport { lt } from \"./lt/lt.js\"\nexport { random } from \"./random/random.js\"\n\n// String\nexport { split } from \"./split/split.js\"\nexport { splitInGroupsOf } from \"./split-in-groups-of/split-in-groups-of.js\"\nexport { startsWith } from \"./starts-with/starts-with.js\"\nexport { endsWith } from \"./ends-with/ends-with.js\"\nexport { toLower } from \"./to-lower/to-lower.js\"\nexport { toUpper } from \"./to-upper/to-upper.js\"\nexport { trim } from \"./trim/trim.js\"\nexport { contains } from \"./contains/contains.js\"\nexport { unite } from \"./unite/unite.js\"\nexport { escapeHTML } from \"./escape-html/escape-html.js\"\nexport { escapeRegExp } from \"./escape-reg-exp/escape-reg-exp.js\"\n"],"names":["isDeepEqual","deepEqual","elapsedTime","groupBy","indexBy","hist","protoChain","sequence","sequenceWhile","tryCatch","raise","type","throttle","debounce","isURI","spy","map","mapMatrix","reduce","converge","forEach","pipe","pipeP","read","get","readMany","write","set","same","i","clone","repeat","curry","compact","compactMany","is","isNothing","not","isTrue","isFalse","isObject","isEmpty","isNotEmpty","isEqual","equals","eq","isBetween","between","any","has","anyWith","hasWith","all","allWith","when","cases","isMatch","pick","pluck","merge","mergeAll","mergeBy","keys","values","rename","renameKeys","renameMany","zipToObject","zipToObj","mutate","mutateMany","mutateWith","update","updateMany","updateWith","top","bottom","first","head","last","tail","page","push","max","maxBy","min","minBy","move","flatten","distinct","distinctBy","dropLast","upsertWith","upsert","append","concat","prepend","toggle","partition","partitionWith","count","length","size","countBy","countWith","replace","replaceWith","sort","sortBy","sortWith","remove","removeWith","hasKey","filter","filterWith","find","findWith","findIndex","findIndexWith","join","joinBy","intersect","intersectBy","dec","inc","gt","lt","random","split","splitInGroupsOf","startsWith","endsWith","toLower","toUpper","trim","contains","unite","escapeHTML","escapeRegExp"],"mappings":"AAAA,MAAM,GACJA,WAAW,EACXA,WAAW,IAAIC,SAAS,QACnB,CAA4B;AACnC,MAAM,GAAGC,WAAW,QAAQ,CAAgC;AAC5D,MAAM,GAAGC,OAAO,QAAQ,CAAwB;AAChD,MAAM,GAAGC,OAAO,QAAQ,CAAwB;AAChD,MAAM,GAAGC,IAAI,QAAQ,CAAgB;AACrC,MAAM,GAAGC,UAAU,QAAQ,CAA8B;AACzD,MAAM,GAAGC,QAAQ,EAAEC,aAAa,QAAQ,CAAwB;AAChE,MAAM,GAAGC,QAAQ,QAAQ,CAA0B;AACnD,MAAM,GAAGC,KAAK,QAAQ,CAAkB;AACxC,MAAM,GAAGC,IAAI,QAAQ,CAAgB;AACrC,MAAM,GAAGC,QAAQ,QAAQ,CAAwB;AACjD,MAAM,GAAGC,QAAQ,QAAQ,CAAwB;AACjD,MAAM,GAAGC,KAAK,QAAQ,CAAoB;AAC1C,MAAM,GAAGC,GAAG,QAAQ,CAAc;AAElC,EAAO,AAAP,KAAO;AACP,MAAM,GAAGC,GAAG,QAAQ,CAAc;AAClC,MAAM,GAAGC,SAAS,QAAQ,CAA4B;AACtD,MAAM,GAAGC,MAAM,QAAQ,CAAoB;AAC3C,MAAM,GAAGC,QAAQ,QAAQ,CAAwB;AACjD,MAAM,GAAGC,OAAO,QAAQ,CAAwB;AAChD,MAAM,GAAGC,IAAI,QAAQ,CAAgB;AACrC,MAAM,GAAGC,KAAK,QAAQ,CAAoB;AAC1C,MAAM,GAAGC,IAAI,IAAIC,GAAG,EAAED,IAAI,EAAEE,QAAQ,QAAQ,CAAgB;AAC5D,MAAM,GAAGC,KAAK,IAAIC,GAAG,EAAED,KAAK,QAAQ,CAAkB;AACtD,MAAM,GAAGE,IAAI,QAAQ,CAAgB;AACrC,MAAM,GAAGC,CAAC,QAAQ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AAM,GAAGC,MAAM,EAAEC,UAAU,QAAQ,CAAoB;AACvD,MAAM,GAAGC,MAAM,QAAQ,CAAsB;AAC7C,MAAM,GAAGC,MAAM,EAAEC,UAAU,QAAQ,CAAoB;AACvD,MAAM,GAAGC,IAAI,EAAEC,QAAQ,QAAQ,CAAgB;AAC/C,MAAM,GAAGC,SAAS,EAAEC,aAAa,QAAQ,CAA4B;AACrE,MAAM,GAAGC,IAAI,EAAEC,MAAM,QAAQ,CAAgB;AAC7C,MAAM,GAAGC,SAAS,EAAEC,WAAW,QAAQ,CAA0B;AAEjE,EAAS,AAAT,OAAS;AACT,MAAM,GAAGC,GAAG,QAAQ,CAAc;AAClC,MAAM,GAAGC,GAAG,QAAQ,CAAc;AAClC,MAAM,GAAGC,EAAE,QAAQ,CAAY;AAC/B,MAAM,GAAGC,EAAE,QAAQ,CAAY;AAC/B,MAAM,GAAGC,MAAM,QAAQ,CAAoB;AAE3C,EAAS,AAAT,OAAS;AACT,MAAM,GAAGC,KAAK,QAAQ,CAAkB;AACxC,MAAM,GAAGC,eAAe,QAAQ,CAA4C;AAC5E,MAAM,GAAGC,UAAU,QAAQ,CAA8B;AACzD,MAAM,GAAGC,QAAQ,QAAQ,CAA0B;AACnD,MAAM,GAAGC,OAAO,QAAQ,CAAwB;AAChD,MAAM,GAAGC,OAAO,QAAQ,CAAwB;AAChD,MAAM,GAAGC,IAAI,QAAQ,CAAgB;AACrC,MAAM,GAAGC,QAAQ,QAAQ,CAAwB;AACjD,MAAM,GAAGC,KAAK,QAAQ,CAAkB;AACxC,MAAM,GAAGC,UAAU,QAAQ,CAA8B;AACzD,MAAM,GAAGC,YAAY,QAAQ,CAAoC"}
|
package/dist/index.test.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* eslint-disable unicorn/prefer-module */
|
|
2
|
-
import test from "tape";
|
|
1
|
+
/* eslint-disable unicorn/prefer-module */ import test from "tape";
|
|
3
2
|
import { createRequire } from "module";
|
|
4
|
-
test("index", function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
test("index", function(t) {
|
|
4
|
+
t.doesNotThrow(function() {
|
|
5
|
+
createRequire(new URL("index.js", import.meta.url));
|
|
6
|
+
}, "Main file loads without errors");
|
|
7
|
+
t.end();
|
|
9
8
|
});
|
|
9
|
+
|
|
10
10
|
//# sourceMappingURL=index.test.js.map
|
package/dist/index.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.test.js"],"
|
|
1
|
+
{"version":3,"sources":["../src/index.test.js"],"sourcesContent":["/* eslint-disable unicorn/prefer-module */\n\nimport test from \"tape\"\nimport { createRequire } from \"module\"\n\ntest(\"index\", t => {\n t.doesNotThrow(() => {\n createRequire(new URL(\"index.js\", import.meta.url))\n }, \"Main file loads without errors\")\n\n t.end()\n})\n"],"names":["test","createRequire","t","doesNotThrow","URL","url","end"],"mappings":"AAAA,EAA0C,AAA1C,sCAA0C,AAA1C,EAA0C,CAE1C,MAAM,CAACA,IAAI,MAAM,CAAM;AACvB,MAAM,GAAGC,aAAa,QAAQ,CAAQ;AAEtCD,IAAI,CAAC,CAAO,QAAEE,QACb,CADaA,CAAC,EAAI,CAAC;IAClBA,CAAC,CAACC,YAAY,CAAC,QACjB,GADuB,CAAC;QACpBF,aAAa,CAAC,GAAG,CAACG,GAAG,CAAC,CAAU,WAAE,WAAW,CAACC,GAAG;IACnD,CAAC,EAAE,CAAgC;IAEnCH,CAAC,CAACI,GAAG;AACP,CAAC"}
|
|
@@ -1,58 +1,49 @@
|
|
|
1
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
|
-
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
6
|
-
|
|
7
1
|
import { find } from "../find/find.js";
|
|
8
2
|
import { curry } from "../curry/curry.js";
|
|
9
3
|
import { any } from "../any/any.js";
|
|
10
4
|
import { isEqual } from "../is-equal/is-equal.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
var _intersectBy = function(predicateFn, mergeFn, aList, bList) {
|
|
6
|
+
if (aList.length === 0 || bList.length === 0) {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
var result = [];
|
|
10
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
11
|
+
try {
|
|
12
|
+
var _loop = function(_iterator, _step) {
|
|
13
|
+
var b = _step.value;
|
|
14
|
+
var a = find(function(item) {
|
|
15
|
+
return predicateFn(item, b);
|
|
16
|
+
}, undefined, aList);
|
|
17
|
+
if (a) {
|
|
18
|
+
var alreadyAdded = any(function(item) {
|
|
19
|
+
return predicateFn(item, a);
|
|
20
|
+
}, result);
|
|
21
|
+
if (!alreadyAdded) {
|
|
22
|
+
result.push(mergeFn(a, b));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
for(var _iterator = bList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop(_iterator, _step);
|
|
27
|
+
} catch (err) {
|
|
28
|
+
_didIteratorError = true;
|
|
29
|
+
_iteratorError = err;
|
|
30
|
+
} finally{
|
|
31
|
+
try {
|
|
32
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
33
|
+
_iterator.return();
|
|
34
|
+
}
|
|
35
|
+
} finally{
|
|
36
|
+
if (_didIteratorError) {
|
|
37
|
+
throw _iteratorError;
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
41
|
-
_loop();
|
|
42
40
|
}
|
|
43
|
-
|
|
44
|
-
_iterator.e(err);
|
|
45
|
-
} finally {
|
|
46
|
-
_iterator.f();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return result;
|
|
41
|
+
return result;
|
|
50
42
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, aList, bList);
|
|
43
|
+
var _intersect = function(aList, bList) {
|
|
44
|
+
return _intersectBy(isEqual, function(a) {
|
|
45
|
+
return a;
|
|
46
|
+
}, aList, bList);
|
|
56
47
|
};
|
|
57
48
|
/**
|
|
58
49
|
* Combine two arrays into one a set (array of unique items), composed of common
|
|
@@ -78,10 +69,7 @@ var _intersect = function _intersect(aList, bList) {
|
|
|
78
69
|
* @example
|
|
79
70
|
* intersect([1, 2, 3, 3], [3, 3, 4, 5])
|
|
80
71
|
* // => [3]
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
export var intersect = curry(_intersect);
|
|
72
|
+
*/ export var intersect = curry(_intersect);
|
|
85
73
|
/**
|
|
86
74
|
* Combine two arrays into one a set (array of unique items), composed of common
|
|
87
75
|
* items from both arrays. Allow custom predicate and merge functions.
|
|
@@ -120,7 +108,6 @@ export var intersect = curry(_intersect);
|
|
|
120
108
|
* ]
|
|
121
109
|
* )
|
|
122
110
|
* // => [{ id: 2, foo: "bar1", comments: [] }]
|
|
123
|
-
*/
|
|
111
|
+
*/ export var intersectBy = curry(_intersectBy);
|
|
124
112
|
|
|
125
|
-
export var intersectBy = curry(_intersectBy);
|
|
126
113
|
//# sourceMappingURL=intersect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/intersect/intersect.js"],"
|
|
1
|
+
{"version":3,"sources":["../../src/intersect/intersect.js"],"sourcesContent":["import { find } from \"../find/find.js\"\nimport { curry } from \"../curry/curry.js\"\nimport { any } from \"../any/any.js\"\nimport { isEqual } from \"../is-equal/is-equal.js\"\n\nconst _intersectBy = (predicateFn, mergeFn, aList, bList) => {\n if (aList.length === 0 || bList.length === 0) {\n return []\n }\n\n const result = []\n\n for (const b of bList) {\n const a = find(item => predicateFn(item, b), undefined, aList)\n\n if (a) {\n const alreadyAdded = any(item => predicateFn(item, a), result)\n\n if (!alreadyAdded) {\n result.push(mergeFn(a, b))\n }\n }\n }\n\n return result\n}\n\nconst _intersect = (aList, bList) => _intersectBy(isEqual, a => a, aList, bList)\n\n/**\n * Combine two arrays into one a set (array of unique items), composed of common\n * items from both arrays.\n *\n * The function starts with an empty array and each item of bList will be\n * searched in aList using a shallow equal. If it's found, it's also checked\n * if it has not been already added.\n *\n * @param {any[]} aList\n * @param {any[]} bList\n *\n * @returns {any[]}\n *\n * @name intersect\n * @tag Array\n * @signature (aList: any[], bList: any[]): any[]\n *\n * @see {@link intersectBy}\n * @see {@link overlap}\n * @see {@link overlapBy}\n *\n * @example\n * intersect([1, 2, 3, 3], [3, 3, 4, 5])\n * // => [3]\n */\nexport const intersect = curry(_intersect)\n\n/**\n * Combine two arrays into one a set (array of unique items), composed of common\n * items from both arrays. Allow custom predicate and merge functions.\n *\n * The function starts with an empty array and each item of bList will be\n * searched in aList using a shallow equal. If it's found, it's also checked\n * if it has not been already added.\n *\n * @param {Function} predicateFn\n * @param {Function} mergeFn\n * @param {any[]} aList\n * @param {any[]} bList\n *\n * @returns {any[]}\n *\n * @name intersectBy\n * @tag Array\n * @signature (predicateFn: Funciton, mergeFn: Function, aList: any[], bList: any[]): any[]\n *\n * @see {@link intersect}\n * @see {@link overlap}\n * @see {@link overlapBy}\n *\n * @example\n * intersectBy(\n * (a, b) => a.id === b.id,\n * (a, b) => ({ ...a, ...b }),\n * [\n * { id: 1, lorem: \"ipsum\" },\n * { id: 2, foo: \"bar1\" },\n * { id: 2, foo: \"bar2\" },\n * ],\n * [\n * { id: 2, comments: [] },\n * { id: 3, comments: [] },\n * ]\n * )\n * // => [{ id: 2, foo: \"bar1\", comments: [] }]\n */\nexport const intersectBy = curry(_intersectBy)\n"],"names":["find","curry","any","isEqual","_intersectBy","predicateFn","mergeFn","aList","bList","length","result","b","a","item","undefined","alreadyAdded","push","_intersect","intersect","intersectBy"],"mappings":"AAAA,MAAM,GAAGA,IAAI,QAAQ,CAAiB;AACtC,MAAM,GAAGC,KAAK,QAAQ,CAAmB;AACzC,MAAM,GAAGC,GAAG,QAAQ,CAAe;AACnC,MAAM,GAAGC,OAAO,QAAQ,CAAyB;AAEjD,GAAK,CAACC,YAAY,GAAG,QAAQ,CAAPC,WAA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