(target, sources)
| 4530 | "use strict" |
| 4531 | |
| 4532 | function assign(target, sources) { |
| 4533 | if (target == null) { |
| 4534 | throw new TypeError("Object.assign target cannot be null or undefined") |
| 4535 | } |
| 4536 | |
| 4537 | var to = Object(target) |
| 4538 | var hasOwnProperty = Object.prototype.hasOwnProperty |
| 4539 | |
| 4540 | for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { |
| 4541 | var nextSource = arguments[nextIndex] |
| 4542 | if (nextSource == null) { |
| 4543 | continue |
| 4544 | } |
| 4545 | |
| 4546 | var from = Object(nextSource) |
| 4547 | |
| 4548 | // We don't currently support accessors nor proxies. Therefore this |
| 4549 | // copy cannot throw. If we ever supported this then we must handle |
| 4550 | // exceptions and side-effects. We don't support symbols so they won't |
| 4551 | // be transferred. |
| 4552 | |
| 4553 | for (var key in from) { |
| 4554 | if (hasOwnProperty.call(from, key)) { |
| 4555 | to[key] = from[key] |
| 4556 | } |
| 4557 | } |
| 4558 | } |
| 4559 | |
| 4560 | return to |
| 4561 | } |
| 4562 | |
| 4563 | module.exports = assign |
| 4564 | }, |
no outgoing calls
no test coverage detected
searching dependent graphs…