diff options
Diffstat (limited to 'node_modules/setprototypeof')
| -rw-r--r-- | node_modules/setprototypeof/LICENSE | 13 | ||||
| -rw-r--r-- | node_modules/setprototypeof/README.md | 21 | ||||
| -rw-r--r-- | node_modules/setprototypeof/index.js | 11 | ||||
| -rw-r--r-- | node_modules/setprototypeof/package.json | 87 |
4 files changed, 132 insertions, 0 deletions
diff --git a/node_modules/setprototypeof/LICENSE b/node_modules/setprototypeof/LICENSE new file mode 100644 index 0000000..61afa2f --- /dev/null +++ b/node_modules/setprototypeof/LICENSE @@ -0,0 +1,13 @@ +Copyright (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. diff --git a/node_modules/setprototypeof/README.md b/node_modules/setprototypeof/README.md new file mode 100644 index 0000000..01d7947 --- /dev/null +++ b/node_modules/setprototypeof/README.md @@ -0,0 +1,21 @@ +# 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 +``` diff --git a/node_modules/setprototypeof/index.js b/node_modules/setprototypeof/index.js new file mode 100644 index 0000000..086a879 --- /dev/null +++ b/node_modules/setprototypeof/index.js @@ -0,0 +1,11 @@ +module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); + +function setProtoOf(obj, proto) { + obj.__proto__ = proto; +} + +function mixinProperties(obj, proto) { + for (var prop in proto) { + obj[prop] = proto[prop]; + } +} diff --git a/node_modules/setprototypeof/package.json b/node_modules/setprototypeof/package.json new file mode 100644 index 0000000..fc9edd3 --- /dev/null +++ b/node_modules/setprototypeof/package.json @@ -0,0 +1,87 @@ +{ + "_args": [ + [ + { + "name": "setprototypeof", + "raw": "setprototypeof@1.0.1", + "rawSpec": "1.0.1", + "scope": null, + "spec": "1.0.1", + "type": "version" + }, + "/Users/warefhaque/CSC309/solutions_repo/node_modules/http-errors" + ] + ], + "_from": "setprototypeof@1.0.1", + "_id": "setprototypeof@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/setprototypeof", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-5-east.internal.npmjs.com", + "tmp": "tmp/setprototypeof-1.0.1.tgz_1454803015119_0.7522649802267551" + }, + "_npmUser": { + "email": "wes@wesleytodd.com", + "name": "wesleytodd" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "setprototypeof", + "raw": "setprototypeof@1.0.1", + "rawSpec": "1.0.1", + "scope": null, + "spec": "1.0.1", + "type": "version" + }, + "_requiredBy": [ + "/http-errors" + ], + "_resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.1.tgz", + "_shasum": "52009b27888c4dc48f591949c0a8275834c1ca7e", + "_shrinkwrap": null, + "_spec": "setprototypeof@1.0.1", + "_where": "/Users/warefhaque/CSC309/solutions_repo/node_modules/http-errors", + "author": { + "name": "Wes Todd" + }, + "bugs": { + "url": "https://github.com/wesleytodd/setprototypeof/issues" + }, + "dependencies": {}, + "description": "A small polyfill for Object.setprototypeof", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "52009b27888c4dc48f591949c0a8275834c1ca7e", + "tarball": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.1.tgz" + }, + "gitHead": "1e3d0cde6b7f4a9fba10cd28e62b200c9d8f899f", + "homepage": "https://github.com/wesleytodd/setprototypeof", + "keywords": [ + "polyfill", + "object", + "setprototypeof" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "wes@wesleytodd.com", + "name": "wesleytodd" + } + ], + "name": "setprototypeof", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/wesleytodd/setprototypeof.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.1" +} |
