Skip to content

Commit

Permalink
commit build
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Epps authored and Ray Epps committed Feb 21, 2024
1 parent 0b81811 commit c97ec85
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
14 changes: 8 additions & 6 deletions cdn/radash.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,14 +489,16 @@ const guard = (func, shouldGuard) => {
}
};

const chain = (...funcs) => (...args) => {
return funcs.slice(1).reduce((acc, fn) => fn(acc), funcs[0](...args));
};
const compose = (...funcs) => {
function chain(...funcs) {
return (...args) => {
return funcs.slice(1).reduce((acc, fn) => fn(acc), funcs[0](...args));
};
}
function compose(...funcs) {
return funcs.reverse().reduce((acc, fn) => fn(acc));
};
}
const partial = (fn, ...args) => {
return (...rest) => fn(...args, ...rest);
return (...rest) => fn(...[...args, ...rest]);
};
const partob = (fn, argobj) => {
return (restobj) => fn({
Expand Down
14 changes: 8 additions & 6 deletions cdn/radash.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,16 @@ var radash = (function (exports) {
}
};

const chain = (...funcs) => (...args) => {
return funcs.slice(1).reduce((acc, fn) => fn(acc), funcs[0](...args));
};
const compose = (...funcs) => {
function chain(...funcs) {
return (...args) => {
return funcs.slice(1).reduce((acc, fn) => fn(acc), funcs[0](...args));
};
}
function compose(...funcs) {
return funcs.reverse().reduce((acc, fn) => fn(acc));
};
}
const partial = (fn, ...args) => {
return (...rest) => fn(...args, ...rest);
return (...rest) => fn(...[...args, ...rest]);
};
const partob = (fn, argobj) => {
return (restobj) => fn({
Expand Down
Loading

0 comments on commit c97ec85

Please sign in to comment.