diff --git a/.changeset/2024-02-27T14:02:57-child-insurgencies-scummy.md b/.changeset/2024-02-27T14:02:57-child-insurgencies-scummy.md new file mode 100644 index 0000000..b4f396e --- /dev/null +++ b/.changeset/2024-02-27T14:02:57-child-insurgencies-scummy.md @@ -0,0 +1,5 @@ +--- +"@yanick/updeep-remeda": patch +--- + +actually make mapIf and mapIfElse accessible. diff --git a/src/index.ts b/src/index.ts index 47d09cd..1cd05f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,7 @@ import filter from "./filter.js"; import reject from "./reject.js"; import matches from "./matches.js"; import myMap from "./map.js"; +import mapIf, { mapIfElse } from "./mapIf.js"; const functions = { constant, @@ -31,6 +32,8 @@ const functions = { skip, update, updateIn, + mapIf, + mapIfElse, }; export { @@ -50,6 +53,8 @@ export { skip, matches, myMap as map, + mapIf, + mapIfElse, }; const merged = update; diff --git a/src/updeep.test.ts b/src/updeep.test.ts index c83d650..1c9fcb9 100644 --- a/src/updeep.test.ts +++ b/src/updeep.test.ts @@ -180,3 +180,8 @@ test("deep equality", () => { 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"); +});