### single(name, callback)
@param {string} name
@param {function} cb
492691
function (name, cb) {
                var cache = singles[slot] = singles[slot] || {};
                cache[name] = cache[name] || [];
                cache[name].push(cb);
            }
108682
function(name) {
            if (!name) return null;

            name = name.toLowerCase();

            var cmdArgs = [].slice.call(arguments, 1),
                cmd, stoped, result, eventParams;
            var me = this;
            cmd = this._getCommand(name);

            eventParams = {
                command: cmd,
                commandName: name.toLowerCase(),
                commandArgs: cmdArgs
            };
            if (!cmd || !~this.queryCommandState(name)) {
                return false;
            }

            if (!this._hasEnterExecCommand) {
                this._hasEnterExecCommand = true;

                stoped = this._fire(new MinderEvent('beforeExecCommand', eventParams, true));

                if (!stoped) {
                    this._fire(new MinderEvent('preExecCommand', eventParams, false));

                    result = cmd.execute.apply(cmd, [me].concat(cmdArgs));

                    this._fire(new MinderEvent('execCommand', eventParams, false));

                    if (cmd.isContentChanged()) {
                        this._firePharse(new MinderEvent('contentchange'));
                    }

                    this._interactChange();
                }
                this._hasEnterExecCommand = false;
            } else {
                result = cmd.execute.apply(cmd, [me].concat(cmdArgs));

                if (!this._hasEnterExecCommand) {
                    this._interactChange();
                }
            }

            return result === undefined ? null : result;
        }
815152
function (name) { var self = this

        //console.log ('callChainMethod', this.constructor.$meta.name, name)

        const methods = _.filter2 (this.constructor.$traits || [], function (Trait) {

                                                                        var method = Trait.prototype[name]

                                                                        // if (method) {
                                                                        //     return (...args) => {
                                                                        //         console.log ('Calling', Trait.$meta.name, name)
                                                                        //         return method.call (self, ...args)
                                                                        //     }
                                                                        // }

                                                                        return (method && method.bind (self)) || false })

        return __.seq (methods) }
898182
function (src, cb) {
      var callbackFct = '__loadjsonp__' + (counter++)
      window[callbackFct] = function () {
        cb.apply(window, arguments)
        delete window[callbackFct]
      }
      this.includeJS(src + (src.indexOf('?') == -1 ? '?' : '&') + 'callback=' + callbackFct, function () {
        // if http request fails (e.g. 404 error / no content)
        setTimeout(window[callbackFct], 10)
      })
    }
221888
function (name, params) {
        assert(isString(name), 'EventEmitter#emit: name is not a string');

        forEach(this._listeners, function (event) {
            if (event.name === name) {
                event.fn.call(event.ctx, params);
            }

            // Special behaviour for wildcard - invoke each event handler.
            var isWildcard = (/^all|\*$/).test(event.name);

            if (isWildcard) {
                event.fn.call(event.ctx, name, params);
            }
        });

        return this;
    }
268568
function (elbName, cb) {
      query(elbName, function (err, data) {
        if (err) return cb(err);
        var result = [];
        data.Instances.map(function (item) { result.push(item.InstanceId); });
        cb(undefined, result);
      });
    }
618068
function(name) {
		var args = arguments;
		args[0] = this.eventName(name);
		$.fn.on.apply(this.$el, args);
	}
1155271
function (name) {
        var all;

        // we first procure all matching events from this list
        all = this.listenersOwn(name);

        this.eachParent(function (parent) {
            var parentEvents;

            // we check that the parent is not immediate mother. then we check whether the non immediate mother has a
            // valid `events` store and only if this store has events with specified listener, we push them to the
            // array we are compiling for return
            (parent !== this.__parent) && EventList.isEventList(parent.events) &&
                (parentEvents = parent.events.listenersOwn(name)) && parentEvents.length &&
                all.unshift.apply(all, parentEvents); // eslint-disable-line prefer-spread
        }, this);

        return all;
    }
1110043
function(name) {
    var idx, length, regexp,
      header = this.headers[Utils.headerize(name)],
      result = [];

    if (header) {
      length = header.length;
      for (idx = 0; idx < length; idx++) {
        result.push(header[idx]);
      }
      return result;
    } else {
      length = this.extraHeaders.length;
      regexp = new RegExp('^\\s*'+ name +'\\s*:','i');
      for (idx=0; idx<length; idx++) {
        header = this.extraHeaders[idx];
        if (regexp.test(header)) {
          result.push(header.substring(header.indexOf(':')+1).trim());
        }
      }
      return result;
    }
  }
744688
function (name) {
                /**
                 * Any of the allowed functions. Arguments are shifted if params is a function so there's no need to give an empty params array.
                 * @param {Array} params optional array of parameters for the function. Treated as success callback if a function instead.
                 * @param {function} success Callback function
                 * @param {function} error   Error handler
                 */
                RPC_API[name] = function (params, success, error) {
                    if (name === 'getInfo') {
                        // hide params from external getInfo calls
                        error = success;
                        success = params;
                        params = [rpcClientVersion];
                    }

                    if (typeof params === 'function') {
                        error = success;
                        success = params;
                        params = [];
                    }

                    channel.call({
                        method: name,
                        params: params,
                        success: success,
                        error: error || defaultErrorHandler
                    });
                };
            }
244336
function(name, callback) {
    if (name in whichCache) {
      return callback(null, whichCache[name]);
    }

    which(name, function(err, result){
      if (err) {
        // Treat errors as not found
        return callback(null, whichCache[name] = '');
      }
      callback(null, whichCache[name] = result);
    });
  }
998735
function(cb) {
        cb = this.wrap(cb);
        this._callbacks.push(cb);
        if (!this._isQueueRunning) {
            if (this.start) {
                this.start();
            } else this.next();
            // this.start();
        }
        return this;
    }
877017
function (cb) {
        return function() {
            var args = Array.prototype.slice.call(arguments);
            var next = args.pop();

            args.push(function() {
                // if (err) return next(err);
                var iargs = Array.prototype.slice.call(arguments);

                next.apply(this, iargs);
            });
            cb.apply(this, args);
        };
    }
322238
function(setArr, cb){
            if(typeof setArr === "string")
                var postData = querystring.stringify([setArr]);
            else if(typeof setArr === "object" || typeof setArr === "array")
                var postData = querystring.stringify(setArr);
            
            var options = {
                host: urlArr.hostname,
                path: "/set",
                port: urlArr.port,
                method: 'POST',
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                    'Content-Length': Buffer.byteLength(postData)
                }
            };
                                    
            var postRequest = protocol.request(options, function(res){
                var result = "";
                
                if(res.statusCode === 200){
                    res.on('error', function(error) {
                        if(typeof cb === "function")
                            cb(error);
                    });
                            
                    res.on('data', function (chunk) {
                        result += chunk;
                    });

                    res.on('end', function (chunk) {
                        if(typeof cb === "function"){
                            var resultObj = JSON.parse(result);
                            var err = (resultObj.status === "error") ? resultObj["msg"] : null;
                            cb(err, resultObj);
                        }    
                    });
                }
                else{
                    if(typeof cb === "function")
                        cb("Request return HTTP "+res.statusCode);
                }
            });
                        
            postRequest.write(postData);
            postRequest.end();
        }
214015
function destroyUser(name, pass, cb) {
  loginUser(name, pass, function(err, user) {
    if(err) return cb(err)
    nano().use(user_dbname).destroy(user._id, user._rev, function(err, doc) {
      if(err) return cb(err)
      user._id = doc.id
      user._rev = doc.rev
      destroyDatabase(name, function(err) {
        if(err) return cb(err)
        cb(null, user)
      })
    })
  })
  // var db = nano().use(user_dbname)
  // db.head(user_namespace+':'+name, function(err, b, h) {
    // if(err) return cb(err)
    // db.destroy(user_namespace+':'+name, JSON.parse(h.etag), function(err, doc) {
      // if(err) return cb(err)
      // destroyDatabase(name, function(err) {
        // if(err) return cb(err)
        // cb(null, doc)
      // })
    // })
  // })
}
1307878
function cb () {
      var ref;
      if (typeof viewMethod === "function") {
        ref = viewMethod;
      } else {
        ref = self.view.get(viewMethod);
      }

      ref.apply(self.view, arguments);
    }
550597
function(name, callback, context) {
      if (!(eventsApi(this, 'on', name, [callback, context]) && callback)) return this;
      this._events || (this._events = {});
      var list = this._events[name] || (this._events[name] = []);
      list.push({callback: callback, context: context, ctx: context || this});
      return this;
    }