{"name":"get-intrinsic","version":"1.2.7","keywords":["javascript","ecmascript","es","js","intrinsic","getintrinsic","es-abstract"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"get-intrinsic@1.2.7","homepage":"https://github.com/ljharb/get-intrinsic#readme","bugs":{"url":"https://github.com/ljharb/get-intrinsic/issues"},"dist":{"shasum":"dcfcb33d3272e15f445d15124bc0a216189b9044","tarball":"http://registry-npm.ywwl.com/get-intrinsic/download/get-intrinsic-1.2.7.tgz","fileCount":9,"integrity":"sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==","signatures":[{"sig":"MEUCIGcu79jd4MNjRYCtMef97IpSGAZW6Ajz6XxbTBzkxzPgAiEA63UOsYkJg7qDPNgoVyeT9OAWi35OQbnRbLe1g2ly0xQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45821,"size":13624,"noattachment":false,"key":"/get-intrinsic/-/get-intrinsic-1.2.7.tgz"},"main":"index.js","engines":{"node":">= 0.4"},"exports":{".":"./index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"70f0c19787dd59a46a99091ec706fada15ddc28a","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","posttest":"npx npm@'>= 10.2' audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc 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/GetIntrinsic.js"},"repository":{"url":"git+https://github.com/ljharb/get-intrinsic.git","type":"git"},"_npmVersion":"10.9.2","description":"Get and robustly cache all JS language-level intrinsics at first require time","directories":{},"sideEffects":false,"_nodeVersion":"23.5.0","dependencies":{"gopd":"^1.2.0","hasown":"^2.0.2","es-errors":"^1.3.0","get-proto":"^1.0.0","has-symbols":"^1.1.0","function-bind":"^1.1.2","es-object-atoms":"^1.0.0","math-intrinsics":"^1.1.0","es-define-property":"^1.0.1","call-bind-apply-helpers":"^1.0.1"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","tape":"^5.9.0","eslint":"=8.8.0","evalmd":"^0.0.19","encoding":"^0.1.13","for-each":"^0.3.3","npmignore":"^0.3.1","call-bound":"^1.0.3","es-abstract":"^1.23.8","mock-property":"^1.1.0","auto-changelog":"^2.5.0","object-inspect":"^1.13.3","es-value-fixtures":"^1.5.0","make-async-function":"^1.0.0","safe-publish-latest":"^2.0.0","@ljharb/eslint-config":"^21.1.1","make-generator-function":"^2.0.0","make-async-generator-function":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/get-intrinsic_1.2.7_1735840488016_0.8380664257897461","host":"s3://npm-registry-packages-npm-production"},"readme":"# get-intrinsic <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\nGet and robustly cache all JS language-level intrinsics at first require time.\n\nSee the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference.\n\n## Example\n\n```js\nvar GetIntrinsic = require('get-intrinsic');\nvar assert = require('assert');\n\n// static methods\nassert.equal(GetIntrinsic('%Math.pow%'), Math.pow);\nassert.equal(Math.pow(2, 3), 8);\nassert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);\ndelete Math.pow;\nassert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);\n\n// instance methods\nvar arr = [1];\nassert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push);\nassert.deepEqual(arr, [1]);\n\narr.push(2);\nassert.deepEqual(arr, [1, 2]);\n\nGetIntrinsic('%Array.prototype.push%').call(arr, 3);\nassert.deepEqual(arr, [1, 2, 3]);\n\ndelete Array.prototype.push;\nGetIntrinsic('%Array.prototype.push%').call(arr, 4);\nassert.deepEqual(arr, [1, 2, 3, 4]);\n\n// missing features\ndelete JSON.parse; // to simulate a real intrinsic that is missing in the environment\nassert.throws(() => GetIntrinsic('%JSON.parse%'));\nassert.equal(undefined, GetIntrinsic('%JSON.parse%', true));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n## Security\n\nPlease email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.\n\n[package-url]: https://npmjs.org/package/get-intrinsic\n[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg\n[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg\n[deps-url]: https://david-dm.org/ljharb/get-intrinsic\n[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic\n[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic\n[actions-url]: https://github.com/ljharb/get-intrinsic/actions\n","publish_time":1735840488205,"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_cnpm_publish_time":1735840488205,"dist-tags":{"latest":"1.3.0"}}