mirror of
https://gitlab.silvrtree.co.uk/martind2000/md-utils.git
synced 2025-01-10 21:15:08 +00:00
added newObjectFrom
This commit is contained in:
parent
03ba3f83dc
commit
9b6118aa37
10
index.js
10
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];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user