File tree Expand file tree Collapse file tree 1 file changed +17
-20
lines changed
lib/node_modules/@stdlib/_tools/pkgs/readmes/bin Expand file tree Collapse file tree 1 file changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -28,26 +28,6 @@ var CLI = require( '@stdlib/cli/ctor' );
28
28
var find = require ( './../lib' ) ; // eslint-disable-line stdlib/no-redeclare
29
29
30
30
31
- // FUNCTIONS //
32
-
33
- /**
34
- * Callback invoked after finding package READMEs.
35
- *
36
- * @private
37
- * @param {(Error|null) } error - error object
38
- * @param {(EmptyArray|StringArray) } files - list of files
39
- * @throws {Error } unexpected error
40
- */
41
- function onFiles ( error , files ) {
42
- if ( error ) {
43
- throw error ;
44
- }
45
- if ( files . length ) {
46
- console . log ( files . join ( '\n' ) ) ; // eslint-disable-line no-console
47
- }
48
- }
49
-
50
-
51
31
// MAIN //
52
32
53
33
/**
@@ -96,6 +76,23 @@ function main() {
96
76
}
97
77
// Find package READMEs:
98
78
find ( opts , onFiles ) ;
79
+
80
+ /**
81
+ * Callback invoked after finding package READMEs.
82
+ *
83
+ * @private
84
+ * @param {(Error|null) } error - error object
85
+ * @param {(EmptyArray|StringArray) } files - list of files
86
+ * @returns {void }
87
+ */
88
+ function onFiles ( error , files ) {
89
+ if ( error ) {
90
+ return cli . error ( error ) ;
91
+ }
92
+ if ( files . length ) {
93
+ console . log ( files . join ( '\n' ) ) ; // eslint-disable-line no-console
94
+ }
95
+ }
99
96
}
100
97
101
98
main ( ) ;
You can’t perform that action at this time.
0 commit comments