{"_id":"has-proto","_rev":"3744975","name":"has-proto","description":"Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T06:28:07.000Z","created":"2022-12-13T05:52:33.190Z","1.2.0":"2024-12-06T18:14:37.917Z","1.1.0":"2024-12-01T17:01:33.378Z","1.0.3":"2024-02-19T20:39:53.253Z","1.0.2":"2024-02-19T20:29:33.104Z","1.0.1":"2022-12-21T19:59:34.415Z","1.0.0":"2022-12-13T05:52:33.190Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-proto.git"},"versions":{"1.2.0":{"name":"has-proto","version":"1.2.0","description":"Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?","main":"index.js","exports":{".":"./index.js","./accessor":"./accessor.js","./mutator":"./mutator.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc -p . && attw -P","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","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/inspect-js/has-proto.git"},"keywords":["prototype","proto","set","get","__proto__","getPrototypeOf","setPrototypeOf","has"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-proto/issues"},"homepage":"https://github.com/inspect-js/has-proto#readme","testling":{"files":"test/index.js"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.0","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/gopd":"^1.0.3","@types/tape":"^5.6.5","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","evalmd":"^0.0.19","gopd":"^1.2.0","in-publish":"^2.0.1","npmignore":"^0.3.1","reflect.getprototypeof":"^1.0.7","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","types"]},"dependencies":{"dunder-proto":"^1.0.0"},"_id":"has-proto@1.2.0","gitHead":"5749979dd8f25ce86f8afb9ea4cce56bc68ca6b5","types":"./index.d.ts","_nodeVersion":"23.3.0","_npmVersion":"10.9.0","dist":{"shasum":"5de5a6eabd95fdffd9818b43055e8065e39fe9d5","size":5434,"noattachment":false,"key":"/has-proto/-/has-proto-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/has-proto/download/has-proto-1.2.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-proto_1.2.0_1733508877740_0.048174024060507525"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-06T18:14:37.917Z","publish_time":1733508877917,"_source_registry_name":"default","_cnpm_publish_time":1733508877917},"1.1.0":{"name":"has-proto","version":"1.1.0","description":"Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?","main":"index.js","exports":{".":"./index.js","./accessor":"./accessor.js","./mutator":"./mutator.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc -p . && attw -P","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","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/inspect-js/has-proto.git"},"keywords":["prototype","proto","set","get","__proto__","getPrototypeOf","setPrototypeOf","has"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-proto/issues"},"homepage":"https://github.com/inspect-js/has-proto#readme","testling":{"files":"test/index.js"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.0","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.0","@types/call-bind":"^1.0.5","@types/gopd":"^1.0.3","@types/tape":"^5.6.5","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","evalmd":"^0.0.19","gopd":"^1.1.0","in-publish":"^2.0.1","npmignore":"^0.3.1","reflect.getprototypeof":"^1.0.7","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","types"]},"dependencies":{"call-bind":"^1.0.7"},"_id":"has-proto@1.1.0","gitHead":"5f7fdfe5cdaa034ab8cd62f2a5eb78d56cc12cd3","types":"./index.d.ts","_nodeVersion":"23.3.0","_npmVersion":"10.9.0","dist":{"shasum":"deb10494cbbe8809bce168a3b961f42969f5ed43","size":5414,"noattachment":false,"key":"/has-proto/-/has-proto-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/has-proto/download/has-proto-1.1.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-proto_1.1.0_1733072493105_0.776594864139537"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-01T17:01:33.378Z","publish_time":1733072493378,"_source_registry_name":"default","_cnpm_publish_time":1733072493378},"1.0.3":{"name":"has-proto","version":"1.0.3","description":"Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc -p .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","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/inspect-js/has-proto.git"},"keywords":["prototype","proto","set","get","__proto__","getPrototypeOf","setPrototypeOf","has"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-proto/issues"},"homepage":"https://github.com/inspect-js/has-proto#readme","testling":{"files":"test/index.js"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.1","safe-publish-latest":"^2.0.0","tape":"^5.7.5","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"]},"_id":"has-proto@1.0.3","gitHead":"8aac68e1d81222fd03804abf958557d89d1764cf","types":"./index.d.ts","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"shasum":"b31ddfe9b0e6e9914536a6ab286426d0214f77fd","size":5090,"noattachment":false,"key":"/has-proto/-/has-proto-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/has-proto/download/has-proto-1.0.3.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-proto_1.0.3_1708375193110_0.34647137114691495"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-19T20:39:53.253Z","publish_time":1708375193253,"_source_registry_name":"default","_cnpm_publish_time":1708375193253},"1.0.2":{"name":"has-proto","version":"1.0.2","description":"Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc -p .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","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/inspect-js/has-proto.git"},"keywords":["prototype","proto","set","get","__proto__","getPrototypeOf","setPrototypeOf","has"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-proto/issues"},"homepage":"https://github.com/inspect-js/has-proto#readme","testling":{"files":"test/index.js"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.1","safe-publish-latest":"^2.0.0","tape":"^5.7.5","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"]},"_id":"has-proto@1.0.2","gitHead":"5ba18151412d137fbf2cd43a7952274666265c75","types":"./index.d.ts","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"shasum":"f32fd42b4a00445fd745dfdae5a8b2ac1b54c02a","size":5023,"noattachment":false,"key":"/has-proto/-/has-proto-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/has-proto/download/has-proto-1.0.2.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-proto_1.0.2_1708374572826_0.8361231257162707"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-19T20:29:33.104Z","publish_time":1708374573104,"_source_registry_name":"default","_cnpm_publish_time":1708374573104},"1.0.1":{"name":"has-proto","version":"1.0.1","description":"Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","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/inspect-js/has-proto.git"},"keywords":["prototype","proto","set","get","__proto__","getPrototypeOf","setPrototypeOf","has"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-proto/issues"},"homepage":"https://github.com/inspect-js/has-proto#readme","testling":{"files":"test/index.js"},"devDependencies":{"@ljharb/eslint-config":"^21.0.0","aud":"^2.0.2","auto-changelog":"^2.4.0","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.0","safe-publish-latest":"^2.0.0","tape":"^5.6.1"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"21f977f068b3e59597576c32f13b4a4ec899adbf","_id":"has-proto@1.0.1","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"shasum":"1885c1305538958aff469fef37937c22795408e0","size":3383,"noattachment":false,"key":"/has-proto/-/has-proto-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/has-proto/download/has-proto-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-proto_1.0.1_1671652774206_0.3361172348787893"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-21T20:00:39.555Z","publish_time":1671652774415,"_cnpm_publish_time":1671652774415},"1.0.0":{"name":"has-proto","version":"1.0.0","description":"Does this environment have the ability to get or set the [[Prototype]] of an object with `__proto__`?","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","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/inspect-js/can-set-proto.git"},"keywords":["prototype","proto","set","get","__proto__","getPrototypeOf","setPrototypeOf","has"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/can-set-proto/issues"},"homepage":"https://github.com/inspect-js/can-set-proto#readme","testling":{"files":"test/index.js"},"devDependencies":{"@ljharb/eslint-config":"^21.0.0","aud":"^2.0.1","auto-changelog":"^2.4.0","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.0","safe-publish-latest":"^2.0.0","tape":"^5.6.1"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"e2c53735fe372158c3ee046457e98ec29ccfaa51","_id":"has-proto@1.0.0","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"shasum":"4c7a434f7d8d9e5772ffc2d6cd893e19e11aaa71","size":3143,"noattachment":false,"key":"/has-proto/-/has-proto-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/has-proto/download/has-proto-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-proto_1.0.0_1670910753021_0.5287417640913448"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-13T05:52:39.921Z","publish_time":1670910753190,"_cnpm_publish_time":1670910753190}},"readme":"# has-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\nDoes this environment have the ability to set the [[Prototype]] of an object on creation with `__proto__`?\n\n## Example\n\n```js\nvar hasProto = require('has-proto');\nvar assert = require('assert');\n\nassert.equal(typeof hasProto(), 'boolean');\n\nvar hasProtoAccessor = require('has-proto/accessor')();\nif (hasProtoAccessor) {\n\tassert.equal([].__proto__, Array.prototype);\n} else {\n\tassert(!('__proto__' in Object.prototype));\n}\n\nvar hasProtoMutator = require('has-proto/mutator');\nvar obj = {};\nassert('toString' in obj);\n\nobj.__proto__ = null;\nif (hasProtoMutator) {\n\tassert(!('toString' in obj));\n} else {\n\tassert('toString' in obj);\n\tassert.equal(obj.__proto__, null);\n}\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/has-proto\n[npm-version-svg]: https://versionbadg.es/inspect-js/has-proto.svg\n[deps-svg]: https://david-dm.org/inspect-js/has-proto.svg\n[deps-url]: https://david-dm.org/inspect-js/has-proto\n[dev-deps-svg]: https://david-dm.org/inspect-js/has-proto/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/has-proto#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/has-proto.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/has-proto.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/has-proto.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=has-proto\n[codecov-image]: https://codecov.io/gh/inspect-js/has-proto/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/has-proto/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-proto\n[actions-url]: https://github.com/inspect-js/has-proto/actions\n","_attachments":{},"homepage":"https://github.com/inspect-js/has-proto#readme","bugs":{"url":"https://github.com/inspect-js/has-proto/issues"},"license":"MIT"}