docs: fix JSDoc text#12296
Merged
Merged
Conversation
Replace `Return the number of CPUs.` with `Number of CPUs.` in `lib/index.js`'s `@module` JSDoc. The package exports a precomputed numeric constant, and the noun-phrase form already used by sibling constants `arch`, `byte-order`, `float-word-order`, and `platform` (4 of 5 constant-exporting siblings in `@stdlib/os`, 80% conformance) applies here. The package's own `docs/types/index.d.ts` already uses `Number of CPUs.`; this commit brings `lib/index.js` into agreement. No runtime behavior changes.
Correct `'tempory'` to `'temporary'` in the `@example` block of `lib/index.js`. The `lib/main.js` JSDoc, the package README, and `docs/types/index.d.ts` all use the correct `'temporary'` spelling; only `lib/index.js` carried the misspelling. No runtime behavior changes.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
May 26, 2026
@stdlib/os/num-cpus and @stdlib/os/tmpdir
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:
@moduleJSDoc in two@stdlib/ospackages back into line with sibling conventions in the same namespace. One change is a typo correction (tempory→temporary); the other replaces a verb-form description on a constant export with the noun-phrase form already used by every other constant in the namespace. Both edits are one-line, documentation-only, no runtime behavior changes.Namespace summary
@stdlib/osREADME.md,bin/cli,docs/repl.txt,docs/types/index.d.ts,docs/types/test.ts,docs/usage.txt,etc/cli_opts.json,examples/index.js,lib/index.js,lib/main.js,package.json,test/test.cli.js,test/test.js),package.jsontop-level key set,directoriescore (doc,example,lib,test), README## Usage/## Examples/## CLIsections,@examplepresence inlib/main.jsandlib/index.js@moduleJSDoc, return-kind, function-export "Return ..." imperative phrasing, constant-export noun-phrase description style.benchmark/benchmark.js(3/8; constants resolved at load time have nothing to benchmark),lib/browser.jsandpackage.jsonbrowserfield (2-3/8; tracks which packages have browser-specific implementations),manifest.json/include//examples/c/(2/8; intentional — only the native-binding packagesbyte-orderandfloat-word-ordercarry these),## NotesREADME section (6/8 = exactly 75%; content is package-specific and not mechanically derivable),publicSignatureandvalidationPrologue(split between constant and function exports; no namespace-wide majority).@stdlib/os/num-cpusIn
lib/index.js, the@moduleJSDoc described the exported value asReturn the number of CPUs.— a verb-form description applied to a constant export. The four other constants in the namespace (arch,byte-order,float-word-order,platform) all use noun-phrase descriptions in their@moduleJSDoc; verb-formReturn ...is reserved for the three function exports (configdir,homedir,tmpdir). The package's owndocs/types/index.d.tsalready usesNumber of CPUs.. Replaces the verb form withNumber of CPUs.to bringlib/index.jsinto agreement with both the sibling-constant convention (4/5 = 80%) and the package's own TypeScript declaration. Pure JSDoc edit; no tests, examples, or runtime behavior affected.@stdlib/os/tmpdirThe
@exampleblock inlib/index.jscarried atemporytypo in the example output path ('/path/to/tempory/files/directory'). The same example inlib/main.js, the README, anddocs/types/index.d.tsall use the correcttemporaryspelling —lib/index.jswas the only site in the package that disagreed with itself.grepfortemporyacross the entire stdlib worktree returns this site and no other. Corrects the spelling in place.Related Issues
No.
Questions
No.
Other
Validation
@stdlib/os(file trees,package.jsonshapes,directorieskeys,manifest.jsonshapes where present, README section orderings, test / benchmark / example filenames).@moduledescription form, dependency sets read fromrequire()calls).@stdlib/os/*.Deliberately excluded
## See Alsomissing innum-cpusREADME — the section is auto-populated and out of scope for this routine.## Notesmissing inplatformandtmpdirREADMEs (and intmpdir/docs/types/index.d.ts) — borderline 75% conformance; the content that exists in sibling Notes sections is package-specific (platform-specific behavior, env-var fallback chains, OS conventions) and not derivable mechanically.benchmark/benchmark.jsabsent inarch,byte-order,float-word-order,num-cpus,platform— these export values resolved once at load time; no behavior to benchmark.lib/browser.jsandpackage.jsonbrowserfield — present only on packages that need a browser-specific implementation (num-cpus,platform); legitimate architectural difference, not drift.manifest.json,include/stdlib/os/*.h,examples/c/*) — present only on the two native-binding packages (byte-order,float-word-order); intentional.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of a cross-package API drift detection routine over
@stdlib/os. Structural and semantic features were extracted from every member package, the majority pattern per feature was computed (≥75% threshold), outliers were checked by three independent validation agents, and only mechanical, behavior-preserving single-line fixes survived to this PR. A human will audit and promote out of draft.Generated by Claude Code