{"_id":"get-proto","_rev":"3690344","name":"get-proto","description":"Robustly get the [[Prototype]] of an object","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T05:46:52.000Z","created":"2025-01-02T06:35:32.977Z","1.0.1":"2025-01-02T20:08:02.949Z","1.0.0":"2025-01-02T06:35:32.977Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ljharb/get-proto.git"},"versions":{"1.0.1":{"name":"get-proto","version":"1.0.1","description":"Robustly get the [[Prototype]] of an object","main":"index.js","exports":{".":"./index.js","./Reflect.getPrototypeOf":"./Reflect.getPrototypeOf.js","./Object.getPrototypeOf":"./Object.getPrototypeOf.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run --silent lint","test":"npm run tests-only","posttest":"npx npm@\">=10.2\" audit --production","tests-only":"nyc tape 'test/**/*.js'","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/get-proto.git"},"keywords":["get","proto","prototype","getPrototypeOf","[[Prototype]]"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/get-proto/issues"},"homepage":"https://github.com/ljharb/get-proto#readme","dependencies":{"dunder-proto":"^1.0.1","es-object-atoms":"^1.0.0"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.2","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.3","@types/tape":"^5.8.0","auto-changelog":"^2.5.0","eslint":"=8.8.0","evalmd":"^0.0.19","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"testling":{"files":"test/index.js"},"_id":"get-proto@1.0.1","gitHead":"1b92a72e80c026d391589a807272c50469d37c43","types":"./index.d.ts","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"150b3f2743869ef3e851ec0c49d15b1d14d00ee1","size":4474,"noattachment":false,"key":"/get-proto/-/get-proto-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-proto/download/get-proto-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-proto_1.0.1_1735848482761_0.710652854201721"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-02T20:08:02.949Z","publish_time":1735848482949,"_source_registry_name":"default","_cnpm_publish_time":1735848482949},"1.0.0":{"name":"get-proto","version":"1.0.0","description":"Robustly get the [[Prototype]] of an object","main":"index.js","exports":{".":"./index.js","./Reflect.getPrototypeOf":"./Reflect.getPrototypeOf.js","./Object.getPrototypeOf":"./Object.getPrototypeOf.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run --silent lint","test":"npm run tests-only","posttest":"npx npm@\">=10.2\" audit --production","tests-only":"nyc tape 'test/**/*.js'","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/get-proto.git"},"keywords":["get","proto","prototype","getPrototypeOf","[[Prototype]]"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/get-proto/issues"},"homepage":"https://github.com/ljharb/get-proto#readme","dependencies":{"dunder-proto":"^1.0.1","es-object-atoms":"^1.0.0"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.2","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.3","@types/tape":"^5.8.0","auto-changelog":"^2.5.0","eslint":"=8.8.0","evalmd":"^0.0.19","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"testling":{"files":"test/index.js"},"_id":"get-proto@1.0.0","gitHead":"ae0906c73d38b6b0d750d685935c1d7eb9e80646","types":"./index.d.ts","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"2f14be4ab6a5ba2ca65b49defb544280730d9c5c","size":4019,"noattachment":false,"key":"/get-proto/-/get-proto-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-proto/download/get-proto-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-proto_1.0.0_1735799732799_0.8974534818128452"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-02T06:35:32.977Z","publish_time":1735799732977,"_source_registry_name":"default","_cnpm_publish_time":1735799732977}},"readme":"# get-proto <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nRobustly get the [[Prototype]] of an object. Uses the best available method.\n\n## Getting started\n\n```sh\nnpm install --save get-proto\n```\n\n## Usage/Examples\n\n```js\nconst assert = require('assert');\nconst getProto = require('get-proto');\n\nconst a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' };\nconst b = { c: 3, __proto__: a };\n\nassert.equal(getProto(b), a);\nassert.equal(getProto(a), Object.prototype);\nassert.equal(getProto({ __proto__: null }), null);\n```\n\n## Tests\n\nClone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/get-proto\n[npm-version-svg]: https://versionbadg.es/ljharb/get-proto.svg\n[deps-svg]: https://david-dm.org/ljharb/get-proto.svg\n[deps-url]: https://david-dm.org/ljharb/get-proto\n[dev-deps-svg]: https://david-dm.org/ljharb/get-proto/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/get-proto#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/get-proto.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/get-proto.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/get-proto.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=get-proto\n[codecov-image]: https://codecov.io/gh/ljharb/get-proto/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/get-proto/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-proto\n[actions-url]: https://github.com/ljharb/get-proto/actions\n","_attachments":{},"homepage":"https://github.com/ljharb/get-proto#readme","bugs":{"url":"https://github.com/ljharb/get-proto/issues"},"license":"MIT"}