update
This commit is contained in:
parent
d9becc67b6
commit
9308795b8b
964 changed files with 104265 additions and 16 deletions
29
node_modules/ramda/es/internal/_objectAssign.js
generated
vendored
Normal file
29
node_modules/ramda/es/internal/_objectAssign.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
import _has from "./_has.js"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
||||
|
||||
function _objectAssign(target) {
|
||||
if (target == null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
var output = Object(target);
|
||||
var idx = 1;
|
||||
var length = arguments.length;
|
||||
|
||||
while (idx < length) {
|
||||
var source = arguments[idx];
|
||||
|
||||
if (source != null) {
|
||||
for (var nextKey in source) {
|
||||
if (_has(nextKey, source)) {
|
||||
output[nextKey] = source[nextKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
idx += 1;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
export default typeof Object.assign === 'function' ? Object.assign : _objectAssign;
|
Loading…
Add table
Add a link
Reference in a new issue