MCPcopy
hub / github.com/mobxjs/mobx / assign

Function assign

docs/assets/getting-started-assets/javascripts/react-with-addons.js:4532–4561  ·  view source on GitHub ↗
(target, sources)

Source from the content-addressed store, hash-verified

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 },

Callers 10

observable.tsFile · 0.85
getExclusiveSummaryFunction · 0.85
getInclusiveSummaryFunction · 0.85
getUnchangedComponentsFunction · 0.85
ReactElementFunction · 0.85
makeSimulatorFunction · 0.85
makeNativeSimulatorFunction · 0.85
shallowCopyFunction · 0.85
updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…