ECMAScript2015(ES2015/ES6)[Object.assign()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) polyfill and [ponyfill](https://ponyfill.com) for ECMAScript 5 environments.
ThepackageisalsoavailableasaUMDmodule(compatiblewithAMD,CommonJSandexposingaglobalvariable`ObjectAssign`) in `dist/object-assign.js` and `dist/object-assign.min.js`(833bytesminifiedandgzipped).
Theversionswithautomaticpolyfillingare`dist/object-assign-auto.js` and `dist/object-assign-auto.min.js`.
##Usage
**CommonJS**:
```javascript
// Polyfill, modifying the global Object
require('es6-object-assign').polyfill();
varobj=Object.assign({},{foo:'bar'});
// Same version with automatic polyfilling
require('es6-object-assign/auto');
varobj=Object.assign({},{foo:'bar'});
// Or ponyfill, using a reference to the function without modifying globals