Add symbol/match
Resolves #8478
Description
What is the purpose of this pull request?
This pull request implements the RFC proposing the addition of the package symbol/match. The package is designed to match the structure and conventions used by existing symbol packages in stdlib, including:
-symbol/has-instance -symbol/iterator -symbol/async-iterator -symbol/is-concat-spreadable
The primary purpose of this package is to export Symbol.match when it exists in the environment, and null otherwise.
This pull request:
-Adds the new @stdlib/symbol/match package -Renames and adapts code from an existing symbol package template -Ensures all references use the correct package name (match) -Creates a variable name consistent with stdlib conventions (e.g., matchSymbol) -Provides updated documentation, descriptions, and examples using MDN reference behavior -Implements tests, benchmarks, and examples for the new package -Verifies the package follows all project conventions and patterns -Updates the copyright years to 2025 -Reviews the implementation to ensure there are no copy-paste mistakes
Related Issues
Does this pull request have any related issues?
This pull request has the following related issues:
- #8478
Questions
Any questions for reviewers of this pull request?
No.
Other
Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.
No.
Checklist
Please ensure the following tasks are completed before submitting this pull request.
- [x] Read, understood, and followed the contributing guidelines.
AI Assistance
When authoring the changes proposed in this PR, did you use any kind of AI assistance?
- [x] Yes
- [ ] No
If you answered "yes" above, how did you use AI assistance?
- [x] Code generation (e.g., when writing an implementation or fixing a bug)
- [x] Test/benchmark generation
- [ ] Documentation (including examples)
- [ ] Research and understanding
Disclosure
If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance.
I used ChatGPT to assist with understanding stdlib package structure and documentation conventions.
All final code, edits, and documentation were authored manually and reviewed by me before submission.
@stdlib-js/reviewers
Coverage Report
| Package | Statements | Branches | Functions | Lines |
|---|---|---|---|---|
| symbol/match | $\color{green}109/109$ $color{green}+100.00%$ |
$\color{red}2/3$ $color{green}+66.67%$ |
$\color{green}0/0$ $color{green}+100.00%$ |
$\color{green}109/109$ $color{green}+100.00%$ |
The above coverage report was generated for the changes in this PR.