{"_id":"protochain","_rev":"13-ed3a0c0850fe55d489e3ead0d98d79bb","name":"protochain","description":"Get the prototype chain of any value as an Array","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"protochain","version":"1.0.0","description":"Prototype chain of any value as an Array","main":"protochain.js","scripts":{"test":"(babel test.js > protochain-test.js) && tape protochain-test.js","prepublish":"babel index.js > protochain.js","pretest":"npm run prepublish","posttest":"rm protochain-test.js"},"keywords":["object","inherit","prototypical","utility","proto","hierarchy","ancestors","grandparents","parents"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"babel":"^4.6.6","tape":"^3.5.0"},"dependencies":{"babel":"^4.6.6","tape":"^3.5.0"},"repository":{"type":"git","url":"https://github.com/timoxley/protochain.git"},"bugs":{"url":"https://github.com/timoxley/protochain/issues"},"homepage":"https://github.com/timoxley/protochain","gitHead":"42871b510e8b51650bdf183d37fa58b0650aad90","_id":"protochain@1.0.0","_shasum":"9f4a30b2890878cba0a86a4c8db95cc147a61d1b","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.10.36","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"9f4a30b2890878cba0a86a4c8db95cc147a61d1b","tarball":"https://registry.npmjs.org/protochain/-/protochain-1.0.0.tgz","integrity":"sha512-LPrVLHptMgb/UVYkqPvXwEy7a3twzZhshDkEFz4QnGuhUT24A2/wN1Yt6g+BkcXmEWcBLnw4Uw+tecp1fw0IWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsAfbCDLPNIsj2U8iyPYtCcMiKqa2oHojk3l+hAeyR8AiBI5mhpEqSgvEbWL7HEGK8XeYZcNu3aj1ZTXYIBx3xpow=="}]}},"1.0.1":{"name":"protochain","version":"1.0.1","description":"Prototype chain of any value as an Array","main":"protochain.js","scripts":{"test":"(babel test.js > protochain-test.js) && tape protochain-test.js","prepublish":"babel index.js > protochain.js","pretest":"npm run prepublish","posttest":"rm protochain-test.js"},"keywords":["object","inherit","prototypical","utility","proto","hierarchy","ancestors","grandparents","parents"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"babel":"^4.6.6","tape":"^3.5.0"},"repository":{"type":"git","url":"https://github.com/timoxley/protochain.git"},"bugs":{"url":"https://github.com/timoxley/protochain/issues"},"homepage":"https://github.com/timoxley/protochain","gitHead":"b5d04f91c7bab574d9ac2c35b38ec69993f67aa9","_id":"protochain@1.0.1","_shasum":"f505743b40ebe839d17e70d561638780bb970af0","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.10.36","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"f505743b40ebe839d17e70d561638780bb970af0","tarball":"https://registry.npmjs.org/protochain/-/protochain-1.0.1.tgz","integrity":"sha512-VisE8ZVfxXfuGE4Z1uPDzkXW5LWfN2PRXe0PZXQTHgB8vG3S+Pa9L23+MC5eQxpH7kImSAjw2M0mIYSmBHrQ9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBp8AGOE3x5TavSwr3i03twwiqjWC7PUgTwMjDTE8K/3AiAiiATPl9jh/Jjb3SDVPx0ULDdiJcMpVDqz1zeXw7zsLQ=="}]}},"1.0.2":{"name":"protochain","version":"1.0.2","description":"Prototype chain of any value as an Array","main":"protochain.js","scripts":{"test":"(babel test.js > protochain-test.js) && tape protochain-test.js","prepublish":"babel index.js > protochain.js","pretest":"npm run prepublish","posttest":"rm protochain-test.js"},"keywords":["object","inherit","prototypical","utility","proto","hierarchy","ancestors","grandparents","parents"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"babel":"^4.6.6","tape":"^3.5.0"},"repository":{"type":"git","url":"https://github.com/timoxley/protochain.git"},"bugs":{"url":"https://github.com/timoxley/protochain/issues"},"homepage":"https://github.com/timoxley/protochain","gitHead":"742e6a8276e7ec561b2474893c24c9370ec78335","_id":"protochain@1.0.2","_shasum":"92115581c8bc0382a7ad0d0c78a355173633de50","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"92115581c8bc0382a7ad0d0c78a355173633de50","tarball":"https://registry.npmjs.org/protochain/-/protochain-1.0.2.tgz","integrity":"sha512-jERa4JqFzaX/rK9vNoVfr8cEdneIyty3evtUUnfCKj0+MdsJw+TdEVw7cGd82yQkKuyYxD2CoS/rAYbPmj/WoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGTw5ONaj3TZnZ3Bm/7YmhY80GuW2TX7OAvmar+4lXvAiAAwrqHWps9vocmZX064mdyO8h/EEwzBJm+MXgDgHH4PA=="}]}},"1.0.3":{"name":"protochain","version":"1.0.3","description":"Prototype chain of any value as an Array","main":"protochain.js","scripts":{"test":"(babel test.js > protochain-test.js) && tape protochain-test.js","prepublish":"babel index.js > protochain.js","pretest":"npm run prepublish","posttest":"rm protochain-test.js"},"keywords":["object","inherit","prototypical","utility","proto","hierarchy","ancestors","grandparents","parents"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"babel":"^5.6.14","tape":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/timoxley/protochain.git"},"bugs":{"url":"https://github.com/timoxley/protochain/issues"},"homepage":"https://github.com/timoxley/protochain","gitHead":"9135625a00fe038926486e23662da516d2f3aef1","_id":"protochain@1.0.3","_shasum":"da0c160d674d6ac4d072778ba5ae3e24b4e1475c","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.1","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"da0c160d674d6ac4d072778ba5ae3e24b4e1475c","tarball":"https://registry.npmjs.org/protochain/-/protochain-1.0.3.tgz","integrity":"sha512-CPSRl+9GL4C2T+4pZVZ0HttNQ6x7z6e0RRBK3hv5bDhKAgjIgduFOAOcH8kY79ZxrdSvQ3p4tBFYSKL1dVmPmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtwykxPMNV4cQoWAjyUsyO3imUooa68bAFrlPEo1O1WwIhALe9S9YzVSb1IWKbOqmYcPvnp8rUq2o3SdXMtKGsudAi"}]}},"1.0.4":{"name":"protochain","version":"1.0.4","description":"Get the prototype chain of any value as an Array","main":"protochain.js","scripts":{"test":"(babel test.js > protochain-test.js) && tape protochain-test.js && standard index.js test.js","prepublish":"babel index.js > protochain.js","pretest":"npm run prepublish","posttest":"rm protochain-test.js"},"babel":{"presets":["es2015"]},"keywords":["object","inherit","inheritance","prototypical","prototype","utility","proto","hierarchy","ancestors","grandparents","parents"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"babel-cli":"^6.10.1","babel-preset-es2015":"^6.9.0","standard":"^7.1.2","tape":"^4.6.0"},"repository":{"type":"git","url":"https://github.com/timoxley/protochain.git"},"bugs":{"url":"https://github.com/timoxley/protochain/issues"},"homepage":"https://github.com/timoxley/protochain","gitHead":"46cea16c5c3f3889f94b9f1bea83df1bb12b2690","_id":"protochain@1.0.4","_shasum":"100e614979f4b8aa05a6df34b49ef97fa8f7b969","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"100e614979f4b8aa05a6df34b49ef97fa8f7b969","tarball":"https://registry.npmjs.org/protochain/-/protochain-1.0.4.tgz","integrity":"sha512-sHdQ25PPtvC0w4nV0tjDKGNQnT3q9khYZykGDl3NAz432WDGNVG++No2E7PhCofUYkxhPNqxOUOd0De4s8YyUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJjhk0bk/KvjFALf6ihFgtvxjDMA3ti3cNTMSAx3GkKgIhAJ4UMIPI5g0C+UkyhphjUGihMvW2HSd0fn3b5Ws6WoYF"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/protochain-1.0.4.tgz_1467268390503_0.21997179673053324"},"deprecated":"Maligned default export for CommonJS consumers. Please update to ^1.0.5."},"1.0.5":{"name":"protochain","version":"1.0.5","description":"Get the prototype chain of any value as an Array","main":"protochain.js","scripts":{"test":"(babel test.js > protochain-test.js) && tape protochain-test.js && standard index.js test.js","prepublish":"babel index.js > protochain.js","pretest":"npm run prepublish","posttest":"rm protochain-test.js"},"babel":{"presets":["es2015"]},"keywords":["object","inherit","inheritance","prototypical","prototype","utility","proto","hierarchy","ancestors","grandparents","parents"],"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"license":"ISC","devDependencies":{"babel-cli":"^6.10.1","babel-preset-es2015":"^6.9.0","standard":"^7.1.2","tape":"^4.6.0"},"repository":{"type":"git","url":"https://github.com/timoxley/protochain.git"},"bugs":{"url":"https://github.com/timoxley/protochain/issues"},"homepage":"https://github.com/timoxley/protochain","gitHead":"eece11ecc91e46e0cc55f1b3510f584239966afd","_id":"protochain@1.0.5","_shasum":"991c407e99de264aadf8f81504b5e7faf7bfa260","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"991c407e99de264aadf8f81504b5e7faf7bfa260","tarball":"https://registry.npmjs.org/protochain/-/protochain-1.0.5.tgz","integrity":"sha512-4hDwFSX50C4NE6f/6zg8EPr/WLPTkFPUtG0ulWZu6bwzV2hmb50fpdQLr0HiKBAUehapaFpItzWoCLjraLJhUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgqeUrN+1CZjxp2LQDh3eNihHUA6WpHpQQAFWbbsjrTAiEAoVb1CZAT5nw/PuxgBU9+NcdbOuVvoqqf08ajZR3UpoY="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/protochain-1.0.5.tgz_1467272419690_0.4231074433773756"}}},"readme":"# protochain\n\n[![Build Status](https://travis-ci.org/timoxley/protochain.svg?branch=master)](https://travis-ci.org/timoxley/protochain)\n\nGet the prototype chain of an object or primitive as an Array.\n\n## Why\n\nI often write this function, figure I should extract it. There are\nprobably other utilities out there that do this but I couldn't find\nthem so they're either poorly named/described or the search algorithm is not being very helpful or I simply searched for the wrong things.\n\n## Installation\n\n```\n> npm install protochain\n```\n\n## Usage\n\n### ES5\n\n```js\nvar protochain = require('protochain')\n\nprotochain({})\n// => [Object.prototype]\n\nprotochain(Object.create(null))\n// => []\n\nprotochain(new Error('message'))\n// => [Error.prototype, Object.prototype]\n\nprotochain(new TypeError('message'))\n// => [TypeError.prototype, Error.prototype, Object.prototype]\n\n// Inheritance\n\nfunction Person() {\n\n}\n\nfunction FancyPerson() {\n  Person.call(this)\n}\n\nFancyPerson.prototype = Object.create(Person.prototype)\n\nprotochain(new Person())\n// => [Person.prototype, Object.prototype]\n\nprotochain(new FancyPerson())\n// => [FancyPerson.prototype, Person.prototype, Object.prototype]\n\n// Primitives are OK\n\nprotochain(123)\n// => [Number.prototype, Object.prototype]\n\nprotochain('abc')\n// => [String.prototype, Object.prototype]\n\nprotochain(/abc/)\n// => [RegExp.prototype, Object.prototype]\n\nprotochain(true)\n// => [Boolean.prototype, Object.prototype]\n\nprotochain(false)\n// => [Boolean.prototype, Object.prototype]\n\n// Null & Undefined === Empty List\n\nprotochain(null)\n// => []\n\nprotochain(undefined)\n// => []\n\nprotochain()\n// => []\n```\n\n### ES6\n\n```js\n\nimport protochain from 'protochain'\n\nclass Person {}\nclass FancyPerson extends Person {}\n\nprotochain(new Person())\n// => [Person.prototype, Object.prototype]\n\nprotochain(new FancyPerson())\n// => [FancyPerson.prototype, Person.prototype, Object.prototype])\n\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"time":{"modified":"2022-06-24T20:57:25.438Z","created":"2015-03-06T03:02:38.248Z","1.0.0":"2015-03-06T03:02:38.248Z","1.0.1":"2015-03-06T04:03:37.158Z","1.0.2":"2015-03-07T02:35:25.435Z","1.0.3":"2015-06-29T11:17:30.631Z","1.0.4":"2016-06-30T06:33:13.455Z","1.0.5":"2016-06-30T07:40:22.704Z"},"homepage":"https://github.com/timoxley/protochain","keywords":["object","inherit","inheritance","prototypical","prototype","utility","proto","hierarchy","ancestors","grandparents","parents"],"repository":{"type":"git","url":"https://github.com/timoxley/protochain.git"},"author":{"name":"Tim Oxley","email":"secoif@gmail.com"},"bugs":{"url":"https://github.com/timoxley/protochain/issues"},"license":"ISC","readmeFilename":"Readme.md","users":{"chocolateboy":true}}