Repository navigation
docs: add missing JSDoc examples in utils/type-of - #16295
Draft
Planeshifter wants to merge 2 commits into
Draft
Planeshifter wants to merge 2 commits into
Planeshifter wants to merge 2 commits into
Conversation
Added missing `@example` blocks to the `typeOf` JSDoc in `lib/main.js` and `lib/polyfill.js` (main function JSDoc carries `@example` in 97% of `utils` packages; 89% of sibling builtin/polyfill implementation files). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E6UUPEB3GQKNEpi1ddopv1
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Replaces `String.prototype.toLowerCase` with `@stdlib/string/base/lowercase` to satisfy the `no-restricted-syntax` lint rule, which is enforced on the files modified in the preceding commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E6UUPEB3GQKNEpi1ddopv1
This branch has not been deployed
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:
@exampleblocks to thetypeOfJSDoc in@stdlib/utils/type-of, bringing the package in line with the rest of theutilsnamespace.String.prototype.toLowerCasewith@stdlib/string/base/lowercasein the same two files, as required by theno-restricted-syntaxlint rule now that the files are touched. The two are behaviorally equivalent.@stdlib/utils/type-oflib/main.jsandlib/polyfill.jsdocumenttypeOfwithout an@example, whereas 97% ofutilspackages (192/198) include one in the main function JSDoc and 89% of sibling builtin/polyfill implementation files (16/18) do likewise. This PR adds the'a' => 'string'and5 => 'number'examples already present inlib/index.jsand the README. No change in behavior.Related Issues
No.
Questions
No.
Other
Namespace summary.
utilshas 198 direct member packages (none autogenerated). Analyzed features: file tree,package.jsonkey sets, README section sets and order, test/benchmark/example file naming, public signature, return kind, validation prologue, error construction, JSDoc shape, andrequire()dependencies. Features with a clear majority (≥75%): file tree,package.jsonkeys, README sections and order, error construction (formatfor interpolated messages), JSDoc@example/@param/@returns/@throwsshape. Features without a clear majority (excluded): public signature, validation prologue sequence, and dependency sets (@stdlib/string/formatreaches 71%).Validation. Structural features were extracted from the filesystem, semantic features were extracted by per-package agents, and each candidate went through three independent reviews (semantic intent, cross-referencing of tests and examples, and structural applicability). Deliberately excluded:
library-manifestconcatenated error messages: the package avoids stdlib dependencies by design (documented in sourceNOTEs).benchmark/benchmark.jsineval,open-url,parallel,library-manifest,timeit, and the namespace packages: side-effecting or environment-bound code, or variant benchmark files.inheritis already covered by bench: add benchmark toutils/inherit#15245.## Notessections, plus## See Also,repl.txtand.d.tsfiles: these need authored content or are generator-owned.format) error messages without interpolation: these are correct perstdlib/no-unnecessary-format.The added example values were verified against both implementations (
main.jsandpolyfill.js).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 cross-package API drift scan of the
utilsnamespace.🤖 Generated with Claude Code
https://claude.ai/code/session_01E6UUPEB3GQKNEpi1ddopv1