-
-
Notifications
You must be signed in to change notification settings - Fork 959
feat: add symbol/to-string-tag
#8491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: add symbol/to-string-tag
#8491
Conversation
Coverage Report
The above coverage report was generated for the changes in this PR. |
| * | ||
| * ## Notes | ||
| * | ||
| * - This symbol is used to determine whether a constructor object recognizes an object as its instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste mistake.
| // EXPORTS // | ||
|
|
||
| /** | ||
| * Has instance symbol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste mistake.
| }; | ||
| } | ||
|
|
||
| function toStringTag( instance ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example needs to be updated to match the README.
| * }; | ||
| * }; | ||
| * | ||
| * ArrayLike[ ToStringTagSymbol ] = isArray; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing. This example needs to be updated.
| 'use strict'; | ||
|
|
||
| /** | ||
| * Symbol used to determine if a constructor object recognizes an object as its instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste mistake.
| * @type {(symbol|null)} | ||
| * | ||
| * @example | ||
| * var isArray = require( '@stdlib/assert/is-array' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example needs updating.
| { | ||
| "name": "@stdlib/symbol/to-string-tag", | ||
| "version": "0.0.0", | ||
| "description": "Has `Symbol.toStringTag` symbol.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description needs updating.
kgryte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left initial comments.
symbol/to-string-tag
Resolves #8482
Description
This pull request implements the RFC proposing the addition of the
symbol/to-string-tagpackage.The package is modeled after existing symbol utilities in the repository, including:
symbol/has-instancesymbol/iteratorsymbol/async-iteratorsymbol/is-concat-spreadableThe new package exports
Symbol.toStringTagwhen available in the current environment.Additional implementation details include:
(e.g.,
has-instance→to-string-tag,HasInstanceSymbol→ToStringTagSymbol)Symbol.toStringTagRelated Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR includes descriptive text drafted with the assistance of ChatGPT to ensure that the RFC details and PR documentation are clear and complete. All code changes were written and validated manually.
@stdlib-js/reviewers