Skip to content

Commit

Permalink
A breathing room
Browse files Browse the repository at this point in the history
  • Loading branch information
flintinatux committed Jun 8, 2018
1 parent 2c2dfdc commit 05b6efb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renameAll.js
Expand Up @@ -4,9 +4,12 @@ const curry = require('ramda/src/curry')
const renameAll = (renames, obj) => {
if (Object.keys(renames).length > 0) {
obj = Object.assign({}, obj)

for (let frum in renames) {
if (!(frum in obj)) continue

const to = renames[frum]

if (typeof to === 'object') {
obj[frum] = renameAll(to, obj[frum])
} else {
Expand Down

0 comments on commit 05b6efb

Please sign in to comment.