Skip to content

Commit 9967a14

Browse files
Sumithrajuweb-flow
andcommitted
chore: fix JavaScript lint error in fs/read-dir examples
Replace `out instanceof Error` with `isError( out )` using `@stdlib/assert/is-error` to comply with the `stdlib/doctest` linting rule. This matches the pattern used in similar packages like `@stdlib/fs/read-file`. Resolves #8483 Co-Authored-By: sumithraju <noreply@github.com>
1 parent 23a6428 commit 9967a14

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • lib/node_modules/@stdlib/fs/read-dir/examples

lib/node_modules/@stdlib/fs/read-dir/examples/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,21 @@
1818

1919
'use strict';
2020

21+
var isError = require( '@stdlib/assert/is-error' );
2122
var readDir = require( './../lib' );
2223

2324
/* Sync */
2425

2526
var out = readDir.sync( __dirname );
2627
// returns <Array>
2728

28-
console.log( out instanceof Error );
29+
console.log( isError( out ) );
2930
// => false
3031

3132
out = readDir.sync( 'beepboop' );
3233
// returns <Error>
3334

34-
console.log( out instanceof Error );
35+
console.log( isError( out ) );
3536
// => true
3637

3738
/* Async */

0 commit comments

Comments
 (0)