Init
This commit is contained in:
commit
4e066bffc9
10017 changed files with 1322084 additions and 0 deletions
20
node_modules/errno/cli.js
generated
vendored
Executable file
20
node_modules/errno/cli.js
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
var errno = require('./')
|
||||
, arg = process.argv[2]
|
||||
, data, code
|
||||
|
||||
if (arg === undefined)
|
||||
return console.log(JSON.stringify(errno.code, null, 2))
|
||||
|
||||
if ((code = +arg) == arg)
|
||||
data = errno.errno[code]
|
||||
else
|
||||
data = errno.code[arg] || errno.code[arg.toUpperCase()]
|
||||
|
||||
if (data)
|
||||
console.log(JSON.stringify(data, null, 2))
|
||||
else {
|
||||
console.error('No such errno/code: "' + arg + '"')
|
||||
process.exit(1)
|
||||
}
|
||||
Loading…
Reference in a new issue