Repository navigation
Conversation
Use the intrinsic own-property check for null-prototype dictionaries and objects containing a hasOwnProperty key. Add regression coverage. AI assistance: OpenAI Codex.
FanWu-ai
marked this pull request as ready for review
October 11, 2026 21:30
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.
isInsupports object own-key membership, but it calls the object'shasOwnPropertyvalue as a method. A null-prototype dictionary throws; a dictionary containing ahasOwnPropertykey can throw or report incorrect membership.Use
Object.prototype.hasOwnProperty.call, matching the existing array branch. Add three regressions covering null prototypes, a non-callable method-name key, and an overridden method that falsely reports every key as present. Inherited keys remain excluded. No dependencies, generated distributions, or unrelated behavior are changed.Validation on Linux:
npm test: 323 passing on Node 24.19.0, including builds, minification, ESLint and coverage.npm test: 326 passing on both Node 24.19.0 and 22.19.0; all build/lint gates pass. Coverage is unchanged (100% statements/functions/lines; 96.59% branches).git diff --checkpasses. Other CI runtimes were not run locally; hosted CI results are separate.Object membership is established by the existing object tests and PR #336.
Checklist
Prepared and tested with OpenAI Codex assistance. No human review or hosted CI pass is claimed.