From 9b6118aa37dfa288c1a4b3eb6bbdc6f2b2b5005a Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Fri, 1 Apr 2016 11:33:25 +0100 Subject: [PATCH] added newObjectFrom --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index da7c595..bbced15 100644 --- a/index.js +++ b/index.js @@ -37,11 +37,11 @@ module.exports = { } return rObj; - }, populateObject(source, reform) { - var rObj = {}; - for (var item in reform) { - if (source.hasOwnProperty()) { - rObj[item] = source[reform[item].from]; + }, populateObject(source, dest) { + var rObj = dest; + for (var item in source) { + if (source.hasOwnProperty(item)) { + rObj[item] = source[item]; } }