Skip to content

Commit a8715fb

Browse files
committed
chore: fix JavaScript lint errors (issue #6704)
1 parent e9406ad commit a8715fb

File tree

1 file changed

+15
-22
lines changed
  • lib/node_modules/@stdlib/utils/async/inmap/lib

1 file changed

+15
-22
lines changed

lib/node_modules/@stdlib/utils/async/inmap/lib/main.js

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,35 +48,28 @@ var factory = require( './factory.js' );
4848
* @returns {void}
4949
*
5050
* @example
51-
* var readFile = require( '@stdlib/fs/read-file' );
51+
* var nextTick = require( '@stdlib/utils/next-tick' );
52+
* var inmapAsync = require( '@stdlib/utils/async/inmap' );
5253
*
53-
* function done( error, results ) {
54-
* if ( error ) {
55-
* throw error;
56-
* }
57-
* console.log( results );
58-
* }
54+
* var arr = [ 1, 2, 3, 4 ];
5955
*
60-
* function read( file, next ) {
61-
* var opts = {
62-
* 'encoding': 'utf8'
63-
* };
64-
* readFile( file, opts, onFile );
56+
* function iterator( val, next ) {
57+
* nextTick( cb );
58+
* function cb() {
59+
* // Return the value multiplied by 2...
60+
* next( null, val*2 );
61+
* }
62+
* }
6563
*
66-
* function onFile( error, data ) {
64+
* function done( error, result ) {
6765
* if ( error ) {
68-
* return next( error );
66+
* throw error;
6967
* }
70-
* next( null, data );
71-
* }
68+
* console.log( result );
69+
* // => [ 2, 4, 6, 8 ]
7270
* }
7371
*
74-
* var files = [
75-
* './beep.js',
76-
* './boop.js'
77-
* ];
78-
*
79-
* inmapAsync( files, read, done );
72+
* inmapAsync( arr, iterator, done );
8073
*/
8174
function inmapAsync( collection, options, fcn, done ) {
8275
if ( arguments.length < 4 ) {

0 commit comments

Comments
 (0)