Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function Glob(options) {
if (!(this instanceof Glob)) {
return new Glob(options);
}
Emitter.call(this);
this.handler = new Handler(this);
this.init(options);
}
function Prompt(question, answers, ui) {
debug('initializing from <%s>', __filename);
if (!question) {
throw new TypeError('expected question to be a string or object');
}
if (!(this instanceof Prompt)) {
var proto = Object.create(Prompt.prototype);
Prompt.apply(proto, arguments);
return proto;
}
Emitter.call(this);
if (!(question instanceof Question)) {
question = new Question(question);
}
this.question = this.options = question;
this.answers = answers || {};
this.context = {};
this.contextHistory = [];
this.actions = new Actions(this);
if (typeof this.options.limit !== 'number') {
this.options.limit = this.options.radio ? 9 : 7;
}
this.ui = ui || UI.create(this.options);
this.rl = this.ui.rl;
function Tip(content, options) {
options = options || {};
if (!(this instanceof Tip)) return tip(content, options);
Emitter.call(this);
this.classname = '';
this.delay = options.delay || 300;
this.pad = null == options.pad ? 15 : options.pad;
this.el = html.cloneNode(true);
this.events = events(this.el, this);
this.classes = classes(this.el);
this.reposition = bind( this, Tip.prototype.reposition );
this.inner = query('.tip-inner', this.el);
this.message(content);
this.position('top');
this.static = !!options.static;
if (Tip.effect) this.effect(Tip.effect);
}
function Loaders(options) {
Emitter.call(this);
this.options = options || {};
this.iterators = this.iterators || {};
}
function Schedule (runner, tasks) {
Emitter.call(this);
this.running = false;
this.define('_callbacks', this._callbacks || {});
this.define('runner', runner);
this.define('tasks', tasks);
this.define('history', []);
this.define('_handlers', {});
}