From 9ad7758ffbdcec115c7e5f90ec9cf86d49d88dc8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 04:46:22 +0000 Subject: [PATCH] docs: add JSDoc example and drop `@private` in `_tools/licenses/infer` Add an `@example` block to the main function JSDoc. Ten of the eleven packages in the `_tools/licenses` namespace (91%) document their main export with an `@example`; `infer` was the sole exception. The example mirrors the module-level example already present in the package's `lib/index.js` and the runnable `examples/index.js`. Remove the `@private` annotation from the same JSDoc comment. The annotated function is the package's public export: `main` resolves to `./lib`, `lib/index.js` re-exports it under the `@stdlib/_tools/licenses/infer` module name, the README documents `infer( pkgs, pattern, clbk )` as the package API, and the package installs a `licenses-infer` CLI binary. No other main export in the namespace carries `@private` (10 of 11, 91%); the genuinely internal helpers in the same directory, `read_files.js` and `infer_license.js`, are the ones legitimately annotated. Both changes are confined to a documentation comment and leave runtime behavior, the public signature, and test expectations unchanged. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014z95KjCnaJkD39ZMk2Jpek --- .../@stdlib/_tools/licenses/infer/lib/main.js | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/licenses/infer/lib/main.js b/lib/node_modules/@stdlib/_tools/licenses/infer/lib/main.js index 8730da082f1c..06e643a10d59 100644 --- a/lib/node_modules/@stdlib/_tools/licenses/infer/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/licenses/infer/lib/main.js @@ -37,10 +37,30 @@ var debug = logger( 'licenses:infer' ); /** * Infers license information from file content. * -* @private * @param {ObjectArray} pkgs - package data * @param {string} pattern - glob pattern * @param {Callback} clbk - callback to invoke upon completion +* +* @example +* var licenses = require( '@stdlib/_tools/licenses/licenses' ); +* +* var pattern = '{readme*,licen[cs]e*,copying*}'; +* +* licenses( onResults ); +* +* function onResults( error, results ) { +* if ( error ) { +* throw error; +* } +* infer( results, pattern, onInfer ); +* } +* +* function onInfer( error, results ) { +* if ( error ) { +* throw error; +* } +* console.dir( results ); +* } */ function infer( pkgs, pattern, clbk ) { var count;