File tree 3 files changed +28
-0
lines changed
3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ var unpack = require('../');
8
8
var format = argv . format || 'pem' ;
9
9
var encoding = argv . e || argv . encoding || 'hex' ;
10
10
11
+ if ( argv . h || argv . help ) {
12
+ return fs . createReadStream ( __dirname + '/usage.txt' )
13
+ . pipe ( process . stdout )
14
+ ;
15
+ }
16
+
11
17
var file = process . argv [ 2 ] || '-' ;
12
18
if ( file === '-' && format === 'json' ) {
13
19
var data = '' ;
Original file line number Diff line number Diff line change
1
+ usage: rsa-unpack {FILE|-} OPTIONS
2
+
3
+ OPTIONS:
4
+
5
+ --format format to expect FILE to be in.
6
+ default: pem or json if FILE ends in .json
7
+
8
+ --encoding, -e encoding to use. default: hex
9
+
Original file line number Diff line number Diff line change @@ -47,6 +47,19 @@ The key can be a public or private key.
47
47
48
48
If the key is invalid, returns undefined.
49
49
50
+ # command-line usage
51
+
52
+ ```
53
+ usage: rsa-unpack {FILE|-} OPTIONS
54
+
55
+ OPTIONS:
56
+
57
+ --format format to expect FILE to be in.
58
+ default: pem or json if FILE ends in .json
59
+
60
+ --encoding, -e encoding to use. default: hex
61
+ ```
62
+
50
63
# install
51
64
52
65
With [ npm] ( https://npmjs.org ) do:
You can’t perform that action at this time.
0 commit comments