Repository navigation
docs: fix JSDoc in string/base/repeat and string/base/slice - #16255
Merged
Merged
Conversation
Renamed the `require` binding in the `lib/index.js` module example from `replace` to `repeat`, matching the identifier used in the example calls (consistent with 58/59, or 98%, of `string/base` siblings). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BHWHhHHqjV8UFohsfxoPku
Changed the `@returns` description from "input string" to "output string", matching the package's own TypeScript declarations and REPL text and the `string/base/slice-code-points` and `string/base/slice-grapheme-clusters` siblings (21/22 non-identity string-returning siblings use "output string"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BHWHhHHqjV8UFohsfxoPku
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
marked this pull request as ready for review
October 24, 2026 02:42
kgryte
approved these changes
Oct 24, 2026
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.
Description
This pull request:
string/basethat differ from the convention their sibling packages follow.Namespace summary.
string/basehas 60 members: 59 function packages and thedistancessub-namespace, which is excluded from the semantic checks. We compared file trees,package.jsonkeys and values, README section order,index.js/main.jsJSDoc shape, validation prologues, error construction and dependencies. Every feature had a clear majority (at least 75%). The structural features conform 100% across the function packages.@stdlib/string/base/repeatThe
lib/index.jsmodule example binds the import toreplacebut callsrepeat(...), so the example throws aReferenceErroras written. This renames the binding torepeat. 58 of 59 siblings (98%) use the same identifier in the binding and in the calls.@stdlib/string/base/slice@returnsinlib/main.jsdescribes the return value as "input string", but the function returns a new substring. This changes it to "output string", which matches the package's owndocs/types/index.d.tsanddocs/repl.txtand its siblingsslice-code-pointsandslice-grapheme-clusters. Only thefor-each*family keeps "input string", because those functions do return their input.Related Issues
No.
Questions
No.
Other
Validation. The structural features were extracted with a script over each package. The semantic features were extracted by agents that read
lib/main.jsandlib/index.jsfor every package. A separate review then checked each candidate for intentional deviation and for tests, examples or sibling docs that depend on the current text. Neither change touches runtime code, tests or public signatures.Deliberately excluded:
format-interpolatebuilds its error messages by string concatenation instead offormat. This is intentional:string/formatdepends on it, so usingformatwould create a circular dependency.lpad,rtrim,kebabCase). These names are internal and not part of the public API.percent-encode,atobandformat-interpolateeach have an open PR, so this PR leaves them alone.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, as part of an automated check for API drift across the packages in a namespace.
@stdlib-js/reviewers
Generated by Claude Code