JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 57784792
  • Score
    100M100P100Q228122F
  • License MIT

ES6 Object.assign() ponyfill

Package Exports

  • object-assign
  • object-assign/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (object-assign) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

object-assign Build Status

ES6 Object.assign() ponyfill

I would love for this to be a fully compliant polyfill, but I have no idea how to read the ES6 spec. Help appreciated :)

Ponyfill: An almost conforming polyfill which doesn't overwrite the native method

Install

Download manually or with a package-manager.

npm

npm install --save object-assign

Bower

bower install --save object-assign

Component

component install sindresorhus/object-assign

Example

objectAssign({foo: 0}, {bar: 1});
//=> {foo: 0, bar: 1}

// multiple sources
[{bar: 1}, {baz: 2}].reduce(objectAssign, {foo: 0});
//=> {foo: 0, bar: 1, baz: 2}

API

objectAssign(target, source)

Assigns enumerable own properties of the source object to the target object and returns the target object.

License

MIT © Sindre Sorhus