make the new functions accessible

This commit is contained in:
Yanick Champoux 2024-02-27 14:04:45 -05:00
parent a05df2a683
commit 2bb0372bdf
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"@yanick/updeep-remeda": patch
---
actually make mapIf and mapIfElse accessible.

View File

@ -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;

View File

@ -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");
});