UNPKG

polyfill-service

Version:
1 lines 1.21 kB
{"aliases":["es5","modernizr:es5object","default","blissfuljs"],"browsers":{"ie":"6 - 8","safari":"4","firefox":"<4","firefox_mob":"<4"},"dependencies":["Object.defineProperties"],"docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create","baseDir":"Object/create","hasTests":true,"rawSource":"\n// Object.create\nObject.create = function create(prototype, properties) {\n\t/* jshint evil: true */\n if (typeof prototype !== 'object' && prototype !== null) {\n throw TypeError('Object prototype may only be an Object or null');\n }\n\n\tvar\n\tobject = new Function('e', 'function Object() {}Object.prototype=e;return new Object')(prototype);\n\n\tobject.constructor.prototype = prototype;\n\n\tif (1 in arguments) {\n\t\tObject.defineProperties(object, properties);\n\t}\n\n\treturn object;\n};\n","minSource":"Object.create=function(e,t){if(\"object\"!=typeof e&&null!==e)throw TypeError(\"Object prototype may only be an Object or null\");var o=new Function(\"e\",\"function Object() {}Object.prototype=e;return new Object\")(e);return o.constructor.prototype=e,1 in arguments&&Object.defineProperties(o,t),o};","detectSource":"'create' in Object"}