Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cli.nopt = function _nopt(options) {
var app = this;
this.nopt = this.opts = nopt.apply(this, options);
this.argv = this.nopt.argv;
if(this.config) {
// sets up each option parsed by nopt as top level prop in app.config
Object.keys(this.nopt).forEach(function(key) {
if(key !== 'argv') app.config.set(key, app.nopt[key]);
});
}
};