Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
alt-nodejs19
/
root
/
lib
/
node_modules
/
npm
/
node_modules
/
nopt
/
lib
/
File Content:
nopt.js
const lib = require('./nopt-lib') const defaultTypeDefs = require('./type-defs') // This is the version of nopt's API that requires setting typeDefs and invalidHandler // on the required `nopt` object since it is a singleton. To not do a breaking change // an API that requires all options be passed in is located in `nopt-lib.js` and // exported here as lib. // TODO(breaking): make API only work in non-singleton mode module.exports = exports = nopt exports.clean = clean exports.typeDefs = defaultTypeDefs exports.lib = lib function nopt (types = {}, shorthands = {}, args = process.argv, slice = 2) { return lib.nopt(args.slice(slice), { types, shorthands: shorthands || {}, typeDefs: exports.typeDefs, invalidHandler: exports.invalidHandler, }) } function clean (data, types, typeDefs = exports.typeDefs) { return lib.clean(data, { types, typeDefs, invalidHandler: exports.invalidHandler, }) }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
debug.js
178 bytes
0644
nopt-lib.js
11207 bytes
0644
nopt.js
939 bytes
0644
type-defs.js
2014 bytes
0644
N4ST4R_ID | Naxtarrr