Uh oh!
There was an error while loading. Please reload this page.
doc: fix URLPattern.exec() example output order - #65803
Open
charpeni wants to merge 1 commit into
Open
Conversation
The two `urlPattern.exec()` examples list the result properties in alphabetical order with JSON-style quoting, which is not what `console.log()` prints. Since the result properties are created in WebIDL order, the output starts with `inputs` followed by the components from `protocol` to `hash`, and each component lists `input` before `groups`. Update both examples to the actual output. Refs: nodejs#64733
Contributor
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. |
URLPattern.exec() example output order
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 freeto 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.
The two
urlPattern.exec()examples indoc/api/url.mdlist the result properties in alphabetical order with JSON-style quoting, which is not whatconsole.log()prints. Since #64733 (v24.20.0, v26.7.0) the result properties are created in WebIDL order, so the output starts withinputs, followed by the components fromprotocoltohash, and each component listsinputbeforegroups.This updates both examples to the actual output of the example code.
Verified by running the example code on v24.19.0 and comparing the printed result with the updated comment block.
Note
Disclosure per the AI use policy: Claude Fable 5.1 (Anthropic), running in Claude Code, was used to audit this page and draft the change. I reviewed the diff and verified the output myself, and I will handle review feedback personally.
Refs: #64733