Completed
Push — master ( 5c721a...2d59ae )
by Elbert
56s
created

index.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
1
'use strict';
2
3
const wappalyzer = require('./driver');
4
5
const args = process.argv.slice(2);
6
7
const url = args[0] || '';
8
9
if ( !url ) {
10
  process.stderr.write('No URL specified\n');
11
12
  process.exit(1);
0 ignored issues
show
Compatibility Debugging Code Best Practice introduced by
Use of process.exit() is discouraged as it will potentially stop the complete node.js application. Consider quitting gracefully instead by throwing an Error.
Loading history...
13
}
14
15
wappalyzer.analyze(url)
16
  .then(json => {
17
    process.stdout.write(JSON.stringify(json, null, 2) + '\n')
18
19
    process.exit(0);
0 ignored issues
show
Compatibility Debugging Code Best Practice introduced by
Use of process.exit() is discouraged as it will potentially stop the complete node.js application. Consider quitting gracefully instead by throwing an Error.
Loading history...
20
  })
21
  .catch(error => {
22
    process.stderr.write(error + '\n')
23
24
    process.exit(1);
0 ignored issues
show
Compatibility Debugging Code Best Practice introduced by
Use of process.exit() is discouraged as it will potentially stop the complete node.js application. Consider quitting gracefully instead by throwing an Error.
Loading history...
25
  });
26