pax_global_header00006660000000000000000000000064130526135460014517gustar00rootroot0000000000000052 comment=a8a71aab8118651b9b0ea97ecfc28521ec82b008 setprototypeof-1.0.3/000077500000000000000000000000001305261354600146265ustar00rootroot00000000000000setprototypeof-1.0.3/LICENSE000066400000000000000000000013271305261354600156360ustar00rootroot00000000000000Copyright (c) 2015, Wes Todd Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. setprototypeof-1.0.3/README.md000066400000000000000000000006211305261354600161040ustar00rootroot00000000000000# Polyfill for `Object.setPrototypeOf` A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. ## Usage: ``` $ npm install --save setprototypeof ``` ```javascript var setPrototypeOf = require('setprototypeof'); var obj = {}; setPrototypeOf(obj, { foo: function() { return 'bar'; } }); obj.foo(); // bar ``` setprototypeof-1.0.3/index.js000066400000000000000000000005161305261354600162750ustar00rootroot00000000000000module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); function setProtoOf(obj, proto) { obj.__proto__ = proto; return obj; } function mixinProperties(obj, proto) { for (var prop in proto) { if (!obj.hasOwnProperty(prop)) { obj[prop] = proto[prop]; } } return obj; } setprototypeof-1.0.3/package.json000066400000000000000000000011041305261354600171100ustar00rootroot00000000000000{ "name": "setprototypeof", "version": "1.0.3", "description": "A small polyfill for Object.setprototypeof", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "https://github.com/wesleytodd/setprototypeof.git" }, "keywords": [ "polyfill", "object", "setprototypeof" ], "author": "Wes Todd", "license": "ISC", "bugs": { "url": "https://github.com/wesleytodd/setprototypeof/issues" }, "homepage": "https://github.com/wesleytodd/setprototypeof" }