extend function

  1. @JS()
dynamic extend(
  1. dynamic target, [
  2. dynamic sources1,
  3. dynamic sources2,
  4. dynamic sources3,
  5. dynamic sources4,
  6. dynamic sources5,
])

Merges multiple objects into the target argument. For properties that are plain Objects, performs a deep-merge. For the rest it just copies the value of the property. To extend prototypes use it as following: Pusher.Util.extend(Target.prototype, Base.prototype) You can also use it to merge objects without altering them: Pusher.Util.extend({}, object1, object2)

Implementation

@JS()
external dynamic /*T*/ extend/*<T>*/(dynamic target,
    [dynamic sources1,
    dynamic sources2,
    dynamic sources3,
    dynamic sources4,
    dynamic sources5]);