{"_id":"spo-gpo","_rev":"1-d652c3be7429a012538cf5af5647c70f","name":"spo-gpo","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"spo-gpo","version":"1.0.0","description":"A small polyfill for Object.setprototypeof and Object.getPrototypeOf","main":"index.js","scripts":{"format":"prettier --write \"*.{js,md}\"","precommit":"npm run -s format"},"author":{"name":"dgeibi"},"keywords":["setprototypeof","getprototypeof","polyfill","object"],"license":"ISC","devDependencies":{"husky":"^0.14.3","prettier":"^1.12.1"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/dgeibi/spo-gpo.git"},"bugs":{"url":"https://github.com/dgeibi/spo-gpo/issues"},"homepage":"https://github.com/dgeibi/spo-gpo#readme","gitHead":"a6cae9bec234052fdadfbe1a30faef20ac4934cc","_id":"spo-gpo@1.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.2.1","_npmUser":{"name":"dgeibi","email":"png.inside@gmail.com"},"dist":{"integrity":"sha512-SqX+oCddva3zroddRDKP4QQ4UCIN8vlr81g2R78/2Isoz2QobVKl+2E12JrFNZ0F5BqaCRpRic8OKHZtv/esQQ==","shasum":"331c34618f7155338b9d4136eadaac2d79273be2","tarball":"https://registry.npmjs.org/spo-gpo/-/spo-gpo-1.0.0.tgz","fileCount":6,"unpackedSize":4007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCi8tCRA9TVsSAnZWagAAXqIP/07efJgU0cq7Icu6eWak\nGiIcBYe1neXjdjBJVyMHTMChDjpXmacwBSNHggDwhLvoTabwRkYlZt9osCVd\n2wd99mFZzc0dNwnoKXsqpSblfaKS1zkBiQ3nr0n14CjhqFOzQGwQK6KtO73B\nK1eNivtFHOUlV3t+mIqXfORB3UuuFia2s4JZ3izpLV94ThI5EvbEMBeEjcSg\nPxg5Q2RnFPzqt368YQB6gmk05g2ZPBhegeA8OjBubKm7/NEtYhVXd/rhgCnk\nHj3LYmQme2Gmr6BEt0rnC+g9/MCdc+TnwF5Hn5JJl2BZNkk+cM5z5mueAbX+\nYshcyVKjeHdN2zRzPh1A3LqYwKEvSaEpce5YXI52SarhNZte2KQwPj5hbjm3\nLRc360amdBaEiKfuizNBNLPEjy0D9s3aBEoe81Wws8Yzpey/Rgp+CcKFLKi5\n1vFczHrMqGPlLlsByUo3hwhRQs6JIgEDB3vMkCOELvco65KTGCrfm5V8J8n+\nyzApJ+GQPQgZ+ze2ehjx1ShXJarZQuNP0BGjr2MUgHgHwwQMMblVtPqCTpUy\nB4gnnVIVWvwGQu6bEpvVWdDkJw2MyEQh2siNi8AWWkuNP8Av5tzR/4GLR2+M\nFFbzKrpgNmV2opNdRXJgS03ChocXM/i5jfAu0h9wN3bmVB3bKZhbt/NMdj33\npYi6\r\n=VKYE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpWfkr36uF5FLVr23nYxx+g3Z3FDMgWyg068RsNC2kSAiBKAsAmJt5TIjVCHj/cCmiX5gsTc6mKyJqcOgrtmBggnA=="}]},"maintainers":[{"name":"dgeibi","email":"png.inside@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spo-gpo_1.0.0_1527394092505_0.3691828694349595"},"_hasShrinkwrap":false}},"time":{"created":"2018-05-27T04:08:12.504Z","1.0.0":"2018-05-27T04:08:12.578Z","modified":"2022-05-18T11:25:06.801Z"},"maintainers":[{"name":"dgeibi","email":"png.inside@gmail.com"}],"description":"A small polyfill for Object.setprototypeof and Object.getPrototypeOf","homepage":"https://github.com/dgeibi/spo-gpo#readme","keywords":["setprototypeof","getprototypeof","polyfill","object"],"repository":{"type":"git","url":"git+https://github.com/dgeibi/spo-gpo.git"},"author":{"name":"dgeibi"},"bugs":{"url":"https://github.com/dgeibi/spo-gpo/issues"},"license":"ISC","readme":"# Polyfill for `Object.setPrototypeOf` and `Object.getPrototypeOf`\n\n## Usage\n\n```\n$ npm install spo-gpo\n```\n\nAs a ponyfill:\n\n```js\nconst assert = require('assert');\nconst { setPrototypeOf, getPrototypeOf } = require('spo-gpo');\n\nconst obj = {};\nconst proto = {\n  foo: function() {\n    return 'bar';\n  }\n};\n\nassert(getPrototypeOf(obj) === Object.prototype);\n\nsetPrototypeOf(obj, proto);\n\nassert(obj.foo() === 'bar');\nassert(getPrototypeOf(obj) === proto);\n```\n\nGlobally, as a polyfill:\n\n```js\nrequire('spo-gpo/polyfill');\n\nconst proto = {\n  foo: function() {\n    return 'bar';\n  }\n};\n\nconst obj = Object.setPrototypeOf({}, proto);\n\nobj.foo(); // 'bar'\nObject.getPrototypeOf(obj); // proto\n```\n\n## Related projects\n\n* [wesleytodd/setprototypeof](https://github.com/wesleytodd/setprototypeof)\n* [paulmillr/es6-shim](https://github.com/paulmillr/es6-shim)\n* [zloirock/core-js](https://github.com/zloirock/core-js)\n","readmeFilename":"README.md"}