Skip to content

Commit

Permalink
comment for rmapValues
Browse files Browse the repository at this point in the history
  • Loading branch information
sadasant committed Feb 26, 2017
1 parent f13af70 commit 7db2212
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const flowMap = (...fns) => _.map(_.flow(...fns))
// defaults in multidimensional arrays
export const rmap = _.curry((fn, obj, map = _.map, is = _.isArray) =>
map(e => is(e) ? rmap(fn, fn(e), map, is) : e, obj))
// rmap for plain objects
export const rmapValues = _.curry((fn, obj) => rmap(fn, obj, _.mapValues, _.isPlainObject))

// Misc
Expand Down

0 comments on commit 7db2212

Please sign in to comment.