Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions lib/node_modules/@stdlib/_tools/pkgs/installed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ var pkgs = require( '@stdlib/_tools/pkgs/installed' );

Generates a list of installed package dependencies.

<!-- run-disable -->

```javascript
pkgs( onPkgs );

Expand All @@ -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.

<!-- run-disable -->

```javascript
var opts = {
'depth': 0 // search only top-level installed packages
Expand All @@ -76,6 +80,8 @@ function onPkgs( error, list ) {

To exclude development package dependencies, set the `dev` option to `false`.

<!-- run-disable -->

```javascript
var opts = {
'dev': false
Expand All @@ -97,11 +103,24 @@ function onPkgs( error, list ) {

<section class="examples">

<!-- ## Examples
## Examples

<!-- run-disable -->

<!-- eslint no-undef: "error" -->
Comment thread
kgryte marked this conversation as resolved.

```javascript
var pkgs = require( '@stdlib/_tools/pkgs/installed' );

``` javascript
pkgs( onPkgs );

``` -->
function onPkgs( error, list ) {
if ( error ) {
throw error;
}
console.dir( list );
}
```

</section>

Expand Down