Skip to content

Commit

Permalink
add addProps (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuswestin committed Jun 12, 2013
1 parent b0213d6 commit 54f9a37
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions addProps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var each = require('./each')
var copy = require('./copy')

module.exports = function addProps(target, moreProps) {
if (!target) { return null }
each(moreProps, function(val, key) {
if (target[key] != null) { return }
target[key] = val
})
return target
}

0 comments on commit 54f9a37

Please sign in to comment.