{"name":"has-proto","version":"1.1.0","keywords":["prototype","proto","set","get","__proto__","getPrototypeOf","setPrototypeOf","has"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"has-proto@1.1.0","homepage":"https://github.com/inspect-js/has-proto#readme","bugs":{"url":"https://github.com/inspect-js/has-proto/issues"},"dist":{"shasum":"deb10494cbbe8809bce168a3b961f42969f5ed43","tarball":"http://registry-npm.ywwl.com/has-proto/download/has-proto-1.1.0.tgz","fileCount":18,"integrity":"sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==","signatures":[{"sig":"MEQCIDnJvd5s4wW2GMXiJsZ6Mbutnlv6YBpvTnlUKMBQDD7SAiBqh+M1cvaimz57rv1nihxXuNPqpYJa2l9jDAMY6e7BXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14560,"size":5414,"noattachment":false,"key":"/has-proto/-/has-proto-1.1.0.tgz"},"main":"index.js","types":"./index.d.ts","engines":{"node":">= 0.4"},"exports":{".":"./index.js","./mutator":"./mutator.js","./accessor":"./accessor.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"5f7fdfe5cdaa034ab8cd62f2a5eb78d56cc12cd3","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"tsc -p . && attw -P","posttest":"npx npm@'>=10.2' audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"testling":{"files":"test/index.js"},"repository":{"url":"git+https://github.com/inspect-js/has-proto.git","type":"git"},"_npmVersion":"10.9.0","description":"Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?","directories":{},"sideEffects":false,"_nodeVersion":"23.3.0","dependencies":{"call-bind":"^1.0.7"},"publishConfig":{"ignore":[".github/workflows","types"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"gopd":"^1.1.0","tape":"^5.9.0","eslint":"=8.8.0","evalmd":"^0.0.19","encoding":"^0.1.13","npmignore":"^0.3.1","in-publish":"^2.0.1","typescript":"next","@types/gopd":"^1.0.3","@types/tape":"^5.6.5","auto-changelog":"^2.5.0","@ljharb/tsconfig":"^0.2.0","@types/call-bind":"^1.0.5","safe-publish-latest":"^2.0.0","@arethetypeswrong/cli":"^0.17.0","@ljharb/eslint-config":"^21.1.1","reflect.getprototypeof":"^1.0.7"},"_npmOperationalInternal":{"tmp":"tmp/has-proto_1.1.0_1733072493105_0.776594864139537","host":"s3://npm-registry-packages"},"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","publish_time":1733072493378,"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_cnpm_publish_time":1733072493378,"dist-tags":{"latest":"1.2.0"}}