File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed
lib/node_modules/@stdlib/utils/async/for-each/lib Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -48,36 +48,29 @@ var factory = require( './factory.js' );
4848* @returns {void }
4949*
5050* @example
51- * var readFile = require( '@stdlib/fs/read-file' );
52- *
5351* function done( error ) {
5452* if ( error ) {
5553* throw error;
5654* }
57- * console.log( 'Successfully read all files.' );
55+ * console.log( 'Successfully processed all files.' );
5856* }
5957*
60- * function read( file, next ) {
61- * var opts = {
62- * 'encoding': 'utf8'
63- * };
64- * readFile( file, opts, onFile );
58+ * function process( file, next ) {
59+ * console.log( 'Processing file: %s', file );
60+ * setTimeout( onTimeout, 1000 );
6561*
66- * function onFile( error ) {
67- * if ( error ) {
68- * return next( error );
69- * }
70- * console.log( 'Successfully read file: %s', file );
62+ * function onTimeout() {
63+ * console.log( 'Finished processing file: %s', file );
7164* next();
7265* }
7366* }
7467*
7568* var files = [
76- * './ beep.js',
77- * './ boop.js'
69+ * 'beep.js',
70+ * 'boop.js'
7871* ];
7972*
80- * forEachAsync( files, read , done );
73+ * forEachAsync( files, process , done );
8174*/
8275function forEachAsync ( collection , options , fcn , done ) {
8376 if ( arguments . length < 4 ) {
You can’t perform that action at this time.
0 commit comments