You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-file-list/README.md
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,17 +47,16 @@ var analyze = require( '@stdlib/_tools/static-analysis/js/summarize-file-list' )
47
47
Performs a static [summary analysis][@stdlib/_tools/static-analysis/js/incr/program-summary] for a list of JavaScript files.
48
48
49
49
```javascript
50
-
var files = [ '/foo/bar/beep.js', '/foo/bar/boop.js' ];
50
+
var files = [ './beep.js', './boop.js' ];
51
+
52
+
analyze( files, clbk );
51
53
52
54
functionclbk( error, results ) {
53
55
if ( error ) {
54
56
throw error;
55
57
}
56
58
console.log( JSON.stringify( results ) );
57
59
}
58
-
59
-
analyze( files, clbk );
60
-
// throws <Error>
61
60
```
62
61
63
62
The function accepts the following `options`:
@@ -67,34 +66,30 @@ The function accepts the following `options`:
67
66
By default, the function performs a cumulative static [summary analysis][@stdlib/_tools/static-analysis/js/incr/program-summary]. To return a separate [program summary][@stdlib/_tools/static-analysis/js/program-summary] for each file in `files`, set the `cumulative` option to `false`.
68
67
69
68
```javascript
70
-
var files = [ '/foo/bar/beep.js', '/foo/bar/boop.js' ];
69
+
var files = [ './beep.js', './boop.js' ];
71
70
72
71
var opts = {
73
72
'cumulative':false
74
73
};
75
74
75
+
analyze( files, opts, clbk );
76
+
76
77
functionclbk( error, results ) {
77
78
if ( error ) {
78
79
throw error;
79
80
}
80
81
console.log( JSON.stringify( results ) );
81
82
}
82
-
83
-
analyze( files, opts, clbk );
84
-
// throws <Error>
85
-
86
83
```
87
84
88
85
#### analyze.sync( files\[, options] )
89
86
90
87
Synchronously performs a static [summary analysis][@stdlib/_tools/static-analysis/js/incr/program-summary] for a list of JavaScript files.
91
88
92
89
```javascript
93
-
var files = [ '/foo/bar/beep.js', '/foo/bar/boop.js' ];
0 commit comments