Skip to content

[RFC]: add symbol/replace #8479

@kgryte

Description

@kgryte

Description

This RFC proposes adding the package symbol/replace.

The package should be very similar to the following existing packages:

  • symbol/has-instance
  • symbol/iterator
  • symbol/async-iterator
  • symbol/is-concat-spreadable

The primary difference is that the package should export Symbol.replace if it exists.

Related Issues

None.

Questions

No.

Other

When adding this package, one should do the following:

  • copy one of the existing packages mentioned above
  • rename the copied package
  • find and replace the package name (e.g., has-instance => replace)
  • find and replace the variable name (e.g., HasInstanceSymbol => ReplaceSymbol)
  • ensure the copyright years are 2025
  • update the descriptions according to the symbol's purpose (see MDN)
  • update examples to reflect the symbol's purpose (see existing packages for inspiration)
  • run tests, benchmarks, and examples to ensure that everything passes
  • go back through and check that there are no copy-paste mistakes

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedRFC feature request which has been accepted.FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.RFCRequest for comments. Feature requests and proposed changes.difficulty: 1Low degree of difficulty. Should be straightforward to implement and/or resolve.priority: NormalNormal priority concern or feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions