make the new functions accessible
This commit is contained in:
parent
a05df2a683
commit
2bb0372bdf
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@yanick/updeep-remeda": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
actually make mapIf and mapIfElse accessible.
|
@ -13,6 +13,7 @@ import filter from "./filter.js";
|
|||||||
import reject from "./reject.js";
|
import reject from "./reject.js";
|
||||||
import matches from "./matches.js";
|
import matches from "./matches.js";
|
||||||
import myMap from "./map.js";
|
import myMap from "./map.js";
|
||||||
|
import mapIf, { mapIfElse } from "./mapIf.js";
|
||||||
|
|
||||||
const functions = {
|
const functions = {
|
||||||
constant,
|
constant,
|
||||||
@ -31,6 +32,8 @@ const functions = {
|
|||||||
skip,
|
skip,
|
||||||
update,
|
update,
|
||||||
updateIn,
|
updateIn,
|
||||||
|
mapIf,
|
||||||
|
mapIfElse,
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@ -50,6 +53,8 @@ export {
|
|||||||
skip,
|
skip,
|
||||||
matches,
|
matches,
|
||||||
myMap as map,
|
myMap as map,
|
||||||
|
mapIf,
|
||||||
|
mapIfElse,
|
||||||
};
|
};
|
||||||
|
|
||||||
const merged = update;
|
const merged = update;
|
||||||
|
@ -180,3 +180,8 @@ test("deep equality", () => {
|
|||||||
|
|
||||||
expect(u(deepOrig, [1, 2, [3, 4]])).toBe(deepOrig);
|
expect(u(deepOrig, [1, 2, [3, 4]])).toBe(deepOrig);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("expect mapIf and mapIfElse to be present", () => {
|
||||||
|
expect(u.mapIf).toBeTypeOf("function");
|
||||||
|
expect(u.mapIfElse).toBeTypeOf("function");
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user