Skip to content

Commit

Permalink
docs: update resolve-parent-paths examples
Browse files Browse the repository at this point in the history
PR-URL: #2908
Co-authored-by: Athan Reines <[email protected]>
Reviewed-by: Athan Reines <[email protected]> 
Signed-off-by: Snehil Shah <[email protected]>
Signed-off-by: Athan Reines <[email protected]>
  • Loading branch information
Snehil-Shah and kgryte authored Sep 16, 2024
1 parent e722c97 commit 8499db6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/fs/resolve-parent-paths/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function onPaths( error, paths ) {
throw error;
}
console.log( paths );
// => '...'
// => [...]
}
```

Expand Down Expand Up @@ -74,7 +74,7 @@ function onPaths( error, paths ) {
throw error;
}
console.log( paths );
// => '...'
// => [...]
}
```

Expand All @@ -92,7 +92,7 @@ function onPaths( error, paths ) {
throw error;
}
console.log( paths );
// => '...'
// => [...]
}
```

Expand All @@ -102,7 +102,7 @@ Synchronously resolves paths from a set of paths by walking parent directories.

```javascript
var paths = resolveParentPaths.sync( [ 'package.json', 'README.md' ] );
// returns [ '...', '...' ]
// returns [...]
```

The function accepts the same `options` as [`resolveParentPaths()`](#resolve-parent-paths).
Expand Down Expand Up @@ -138,14 +138,14 @@ var opts = {
/* Sync */

var out = resolveParentPaths.sync( [ 'package.json', 'README.md' ], opts );
// returns [ '...', '...' ]
// returns [...]

out = resolveParentPaths.sync( [ 'non_existent_basename' ], opts );
// returns []

opts.mode = 'first';
out = resolveParentPaths.sync( [ 'non_existent_basename', 'package.json' ], opts );
// returns [ '...' ]
// returns [...]

/* Async */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var opts = {

var out = resolveParentPaths.sync( [ 'package.json', 'README.md' ], opts );
console.log( out );
// => [ '...', '...' ]
// => [...]

out = resolveParentPaths.sync( [ 'non_existent_basename', 'package.json' ], opts );
console.log( out );
Expand All @@ -37,7 +37,7 @@ console.log( out );
opts.mode = 'first';
out = resolveParentPaths.sync( [ 'non_existent_basename', 'package.json' ], opts );
console.log( out );
// => [ '...' ]
// => [...]

/* Async */

Expand Down

1 comment on commit 8499db6

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
fs/resolve-parent-paths $\color{green}787/787$
$\color{green}+100.00\%$
$\color{green}112/112$
$\color{green}+100.00\%$
$\color{green}21/21$
$\color{green}+100.00\%$
$\color{green}787/787$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.