get-intrinsic (v1.3.0) provides a robust way to access JavaScript language-level intrinsics (e.g., %Array.prototype.push%) at runtime, caching them at first require. Maintained by ljharb and updated regularly, it is used internally by es-abstract and other ECMAScript polyfill libraries. Key differentiator: guarantees access even when intrinsics are deleted or overridden, with optional allowance for missing features. Published weekly, supports Node >=0.4.
npm install get-intrinsicNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates requiring the module, accessing cached intrinsics, and using the allowMissing flag.
Use require('get-intrinsic') or configure bundler for CommonJS interop.Refer to the ECMAScript specification for correct intrinsic names.
Check the implementation or spec for which intrinsics are optional.
Run 'npm install get-intrinsic' and ensure require('get-intrinsic') without relative path.Use const GetIntrinsic = require('get-intrinsic'); do not use import or destructure.Double-check spelling against ECMAScript spec; e.g., '%Array.prototype.push%' (case-sensitive).
Update Node to >=0.4.
No dependency data recorded yet.