{"name":"reflect.getprototypeof","version":"1.0.9","description":"An ES2015 mostly-spec-compliant `Reflect.getPrototypeOf` sham/polyfill/replacement that works in as many engines as possible","main":"index.js","type":"commonjs","exports":{".":"./index.js","./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound","pretest":"npm run lint","tests-only":"nyc 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/es-shims/Reflect.getPrototypeOf.git"},"keywords":["Reflect.getPrototypeOf","Object.getPrototypeOf","proto","__proto__","[[Prototype]]","getPrototypeOf","ES5","shim","polyfill","es-shim API","browser"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/Reflect.getPrototypeOf/issues"},"homepage":"https://github.com/es-shims/Reflect.getPrototypeOf","engines":{"node":">= 0.4"},"dependencies":{"call-bind":"^1.0.8","define-properties":"^1.2.1","dunder-proto":"^1.0.1","es-abstract":"^1.23.6","es-errors":"^1.3.0","get-intrinsic":"^1.2.6","gopd":"^1.2.0","which-builtin-type":"^1.2.1"},"devDependencies":{"@es-shims/api":"^2.5.1","@ljharb/eslint-config":"^21.1.1","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","evalmd":"^0.0.19","functions-have-names":"^1.2.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.9.0"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"testling":{"files":"test/implementation.js"},"_id":"reflect.getprototypeof@1.0.9","gitHead":"f6a31505b286a6c39fdd9c7bba7cd625b05b9150","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-r0Ay04Snci87djAsI4U+WNRcSw5S4pOH7qFjd/veA5gC7TbqESR3tcj28ia95L/fYUDw11JKP7uqUKUAfVvV5Q==","shasum":"c905f3386008de95a62315f3ea8630404be19e2f","tarball":"http://registry-npm.ywwl.com/reflect.getprototypeof/download/reflect.getprototypeof-1.0.9.tgz","fileCount":15,"unpackedSize":23312,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsSHiK3ipfAFwiakoJAt1r4M2nSH1iea0XntVBUMOCbgIhAICuOl7Lxer2mvmLS0NsVuf4Xrmj+bs7QaKD7veRG755"}],"size":7607,"noattachment":false,"key":"/reflect.getprototypeof/-/reflect.getprototypeof-1.0.9.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/reflect.getprototypeof_1.0.9_1734543561670_0.8728921403389549"},"_hasShrinkwrap":false,"readme":"# reflect.getprototypeof <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ES2015 mostly-spec-compliant `Reflect.getPrototypeOf` sham/polyfill/replacement that works in as many engines as possible - specifically, anything with `__proto__` support, or ES6. Built-in types will also work correctly in older engines.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/5.1/).\n\n## Example\n\n```js\nvar getPrototypeOf = require('reflect.getprototypeof');\nvar assert = require('assert');\n\nassert.throws(() => getPrototypeOf(true));\nassert.throws(() => getPrototypeOf(42));\nassert.throws(() => getPrototypeOf(''));\nassert.equal(getPrototypeOf(/a/g), RegExp.prototype);\nassert.equal(getPrototypeOf(new Date()), Date.prototype);\nassert.equal(getPrototypeOf(function () {}), Function.prototype);\nassert.equal(getPrototypeOf([]), Array.prototype);\nassert.equal(getPrototypeOf({}), Object.prototype);\n```\n\n```js\nvar getPrototypeOf = require('reflect.getprototypeof');\nvar assert = require('assert');\n/* when Reflect or Reflect.getPrototypeOf is not present */\nif (typeof Reflect === 'object') { delete Reflect.getPrototypeOf; }\ndelete globalThis.Reflect;\nvar shimmed = getPrototypeOf.shim();\nassert.equal(shimmed, getPrototypeOf.getPolyfill());\n\nassert.throws(() => Reflect.getPrototypeOf(true));\nassert.throws(() => Reflect.getPrototypeOf(42));\nassert.throws(() => Reflect.getPrototypeOf(''));\nassert.equal(Reflect.getPrototypeOf(/a/g), RegExp.prototype);\nassert.equal(Reflect.getPrototypeOf(new Date()), Date.prototype);\nassert.equal(Reflect.getPrototypeOf(function () {}), Function.prototype);\nassert.equal(Reflect.getPrototypeOf([]), Array.prototype);\nassert.equal(Reflect.getPrototypeOf({}), Object.prototype);\n```\n\n```js\nvar getPrototypeOf = require('reflect.getprototypeof');\nvar assert = require('assert');\n/* when Reflect.getPrototypeOf is present */\nvar shimmedGetPrototypeOf = getPrototypeOf.shim();\nassert.equal(shimmedGetPrototypeOf, Reflect.getPrototypeOf);\nassert.equal(Reflect.getPrototypeOf([]), Array.prototype);\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/reflect.getprototypeof\n[npm-version-svg]: https://versionbadg.es/es-shims/Reflect.getPrototypeOf.svg\n[deps-svg]: https://david-dm.org/es-shims/Reflect.getPrototypeOf.svg\n[deps-url]: https://david-dm.org/es-shims/Reflect.getPrototypeOf\n[dev-deps-svg]: https://david-dm.org/es-shims/Reflect.getPrototypeOf/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Reflect.getPrototypeOf#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/reflect.getprototypeof.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/reflect.getprototypeof.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/reflect.getprototypeof.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=reflect.getprototypeof\n[codecov-image]: https://codecov.io/gh/es-shims/Reflect.getPrototypeOf/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Reflect.getPrototypeOf/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Reflect.getPrototypeOf\n[actions-url]: https://github.com/es-shims/Reflect.getPrototypeOf/actions\n","publish_time":1734543561848,"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_cnpm_publish_time":1734543561848,"dist-tags":{"latest":"1.0.10"}}