This package, `es-array-method-boxes-properly`, is a niche utility designed to verify the spec compliance of `Array.prototype` methods in a given JavaScript environment. Specifically, it checks if a method like `map` or `forEach` properly "boxes" the `this` context (receiver) and the third argument (the array itself) when invoking the callback function. This is critical for ensuring consistent behavior across different JavaScript engines, especially regarding strict mode implications and how primitives are handled when passed as `this`. Currently at version 1.0.0, the package provides a stable API and is likely maintained on an as-needed basis, reflecting its role in foundational spec compliance rather than active feature development. It is primarily used by library authors or engine developers to detect subtle deviations from the ECMAScript specification in host environments.
npm install es-array-method-boxes-properlyVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import the `boxesProperly` function and use it to check the compliance of `Array.prototype.map` and `forEach` in the current runtime environment.
Ensure you understand that the check applies to the environment's built-in methods, not custom implementations. If you're using a polyfill, its behavior depends on the polyfill itself.
Consult the ECMAScript specification for `Array.prototype` methods to understand the precise requirements for 'boxing' the `this` value and the third argument in callback functions.
No dependency data recorded yet.