Skip to content

Commit

Permalink
fix: leave arrays in fixtures intact
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Feb 12, 2018
1 parent 87a1889 commit c203d8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/map-values-deep.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ module.exports = mapValuesDeep
const _ = require('lodash')

function mapValuesDeep (v, callback) {
if (_.isArray(v)) {
return _.map(v, v => mapValuesDeep(v, callback))
}

if (_.isObject(v)) {
return _.mapValues(v, v => mapValuesDeep(v, callback))
}
Expand Down

0 comments on commit c203d8b

Please sign in to comment.