1 | import { is, addIndex, pipe, reject, isNil, ifElse, map, mapObjIndexed } from 'ramda';
|
2 |
|
3 | const indexedMap = addIndex(map);
|
4 | export const forEach = (data, func) => pipe(reject(isNil), ifElse(is(Array), indexedMap(func), mapObjIndexed(func)))(data);
|
5 |
|
6 | export default forEach;
|
7 | //# sourceMappingURL=for-each.js.map |
\ | No newline at end of file |