Skip to content

Commit

Permalink
proper object.assign babel; new version in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Feb 25, 2017
1 parent 6d5b0b0 commit 51b590f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ node_js:
- "5"
- "4"
- "3"
- "2"
- "0.12"
- "0.11"
40 changes: 37 additions & 3 deletions dist/joiner.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4096,6 +4096,40 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};





















var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];

for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}

return target;
};

function addNulls(data, nullKeyObj, nestKey) {
data.forEach(function (datum) {
var nestedDestination;
Expand All @@ -4112,7 +4146,7 @@ function addNulls(data, nullKeyObj, nestKey) {
// You could extend `nullKeyObjPersist` with `datum` but that would reverse the order of your keys
// And always put your keys that have nulls (which are probably the least important keys) first.
// This way will overwrite everything with nulls, then rewrite keys that have values.
Object.assign(datum, nullKeyObj, datumPersist);
_extends(datum, nullKeyObj, datumPersist);
});
return data;
}
Expand Down Expand Up @@ -4160,9 +4194,9 @@ function joinOnMatch(leftData, leftKeyColumn, keyMap, nestKey, geoJson, reportDa
reportData.aKeys.push(leftKeyValue);
if (match) {
if (typeof nestKey === 'string' && nestKey !== '') {
set_1(datum, nestKey, Object.assign(get_1(datum, nestKey) || {}, match));
set_1(datum, nestKey, _extends(get_1(datum, nestKey) || {}, match));
} else {
Object.assign(datum, match);
_extends(datum, match);
}
}
});
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"devDependencies": {
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-lodash": "^3.2.11",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2015": "^6.22.0",
"chai": "^3.5.0",
"indian-ocean": "^2.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
]
],
"plugins": [
"transform-object-assign",
"lodash",
"external-helpers"
]
Expand Down

0 comments on commit 51b590f

Please sign in to comment.