diff --git a/lib/node_modules/@stdlib/_tools/pkgs/installed/README.md b/lib/node_modules/@stdlib/_tools/pkgs/installed/README.md index 5185d8a99e85..9834c18026c3 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/installed/README.md +++ b/lib/node_modules/@stdlib/_tools/pkgs/installed/README.md @@ -40,6 +40,8 @@ var pkgs = require( '@stdlib/_tools/pkgs/installed' ); Generates a list of installed package dependencies. + + ```javascript pkgs( onPkgs ); @@ -59,6 +61,8 @@ The function accepts the following `options`: By default, the function searches the entire package dependency tree. To limit the search depth, set the `depth` option. + + ```javascript var opts = { 'depth': 0 // search only top-level installed packages @@ -76,6 +80,8 @@ function onPkgs( error, list ) { To exclude development package dependencies, set the `dev` option to `false`. + + ```javascript var opts = { 'dev': false @@ -97,11 +103,24 @@ function onPkgs( error, list ) {
- + + + +```javascript +var pkgs = require( '@stdlib/_tools/pkgs/installed' ); -``` javascript +pkgs( onPkgs ); -``` --> +function onPkgs( error, list ) { + if ( error ) { + throw error; + } + console.dir( list ); +} +```