mirror of
https://gitlab.silvrtree.co.uk/martind2000/md-utils.git
synced 2025-01-10 23:35: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;
|
return rObj;
|
||||||
}, populateObject(source, reform) {
|
}, populateObject(source, dest) {
|
||||||
var rObj = {};
|
var rObj = dest;
|
||||||
for (var item in reform) {
|
for (var item in source) {
|
||||||
if (source.hasOwnProperty()) {
|
if (source.hasOwnProperty(item)) {
|
||||||
rObj[item] = source[reform[item].from];
|
rObj[item] = source[item];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user