Open
Conversation
Contributor
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This commit adds the `@stdlib/symbol/split` package which exports `Symbol.split` if the environment supports it, otherwise `null`. The `Symbol.split` symbol specifies a method that splits a string at the indices that match a regular expression. When calling `String.prototype.split` and the separator argument is an object with a `[Symbol.split]()` method, this method is called with the target string and limit as arguments. The package structure follows the existing convention established by similar packages such as `symbol/replace`, `symbol/has-instance`, and `symbol/is-concat-spreadable`. Closes: stdlib-js#8488
450289c to
09799ea
Compare
Contributor
Author
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.
Resolves #8488.
Description
This pull request adds the
@stdlib/symbol/splitpackage, which provides access tothe well-known
Symbol.splitsymbol in environments that support it andnullotherwise.
The package follows established stdlib conventions and includes documentation,
examples, tests, REPL help text, TypeScript definitions, and namespace integration.
Related Issues
symbol/split#8488Questions
No.
Other
Implementation Notes
The package structure follows existing conventions established by similar stdlib
packages, including:
@stdlib/symbol/replace@stdlib/symbol/has-instance@stdlib/symbol/is-concat-spreadableFiles Added
lib/node_modules/@stdlib/symbol/split/lib/main.jsSymbol.splitornulllib/node_modules/@stdlib/symbol/split/lib/index.jslib/node_modules/@stdlib/symbol/split/test/test.jslib/node_modules/@stdlib/symbol/split/examples/index.jslib/node_modules/@stdlib/symbol/split/README.mdlib/node_modules/@stdlib/symbol/split/package.jsonlib/node_modules/@stdlib/symbol/split/docs/repl.txtlib/node_modules/@stdlib/symbol/split/docs/types/index.d.tslib/node_modules/@stdlib/symbol/split/docs/types/test.tsFiles Modified
lib/node_modules/@stdlib/symbol/lib/index.jsSplitSymbolto the symbol namespaceTest Results
All tests pass.
Checklist
AI Assistance
Disclosure:
AI assistance was used to generate the initial implementation, tests, and
documentation based on existing stdlib symbol packages. I reviewed the generated
code, verified its behavior locally, ensured it follows project conventions, and
take responsibility for this contribution.
@stdlib-js/reviewers