Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
local
/
lib
/
node_modules
/
pnpm
/
dist
/
node_modules
/
nopt
/
bin
Upload
3 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
nopt.js
644 B
-rw-r--r--
1985-10-26 08:15:00
Edit
Del
Editing: nopt.js
(644 B)
Path: /usr/local/lib/node_modules/pnpm/dist/node_modules/nopt/bin/nopt.js
Back
#!/usr/bin/env node const nopt = require('../lib/nopt') const path = require('path') console.log('parsed', nopt({ num: Number, bool: Boolean, help: Boolean, list: Array, 'num-list': [Number, Array], 'str-list': [String, Array], 'bool-list': [Boolean, Array], str: String, clear: Boolean, config: Boolean, length: Number, file: path, }, { s: ['--str', 'astring'], b: ['--bool'], nb: ['--no-bool'], tft: ['--bool-list', '--no-bool-list', '--bool-list', 'true'], '?': ['--help'], h: ['--help'], H: ['--help'], n: ['--num', '125'], c: ['--config'], l: ['--length'], f: ['--file'], }, process.argv, 2))