UNPKG

object.assign

Version:

ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim

15 lines (12 loc) 305 B
'use strict'; var define = require('define-properties'); var getPolyfill = require('./polyfill'); module.exports = function shimAssign() { var polyfill = getPolyfill(); define( Object, { assign: polyfill }, { assign: function () { return Object.assign !== polyfill; } } ); return polyfill; };