Use native implementations of Object.keys and Array.isArray - #13
Draft
legobeat wants to merge 4 commits into
Draft
Use native implementations of Object.keys and Array.isArray#13legobeat wants to merge 4 commits into
legobeat wants to merge 4 commits into
Conversation
legobeat
marked this pull request as ready for review
February 1, 2024 10:08
legobeat
force-pushed
the
native-object-keys-isarray
branch
from
February 1, 2024 10:10
c15d6b0 to
2de457a
Compare
legobeat
force-pushed
the
native-object-keys-isarray
branch
from
February 1, 2024 10:23
2de457a to
8b53f17
Compare
ljharb
requested changes
Feb 1, 2024
ljharb
left a comment
Owner
There was a problem hiding this comment.
The 0.6 failure is because node itself can't compile, not because the project doesn't pass on it.
EOL status is irrelevant.
The code paths we use here don't mutate globals, so it shouldn't break any static analysis worth relying on.
Additionally, Object.keys has a ton of bugs in a ton of engines, including browsers, so using the package is the safest approach by a long shot.
ljharb
marked this pull request as draft
February 1, 2024 17:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
json-stable-stringifyis already failing CI tests on Node.js version <=0.6 (https://github.com/ljharb/json-stable-stringify/actions/runs/7545755257/job/20542261535).Node.js 0.10 went EOL in 2016.
The shims contain code permuting globals, which causes noise in static analysis and may be an cause issues if inadvertently triggered.
isarraywith nativeArray.isArrayobject-keyswith nativeObject.keys