How to use the q.nbind function in q

To help you get started, we’ve selected a few q examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appium / appium / test / functional / dynamic-app / code-injector.js View on Github external
CodeInjector.prototype.stop = function () {
  console.log('stoping code injector');
  var close = Q.nbind(this.server.close, this.server);
  return close();
};
github gleitz / mahjong / server / models.js View on Github external
module.exports.findOneGame = function(game_id) {
    var findOneGame = Q.nbind(db.games.findOne, db.games);
    return findOneGame({_id: new ObjectID(game_id)});
};
github m-ou-se / teck-programmer / programmer.js View on Github external
function send_packet(device, data) {
	var bmRequestType = usb.LIBUSB_ENDPOINT_OUT | usb.LIBUSB_REQUEST_TYPE_CLASS | usb.LIBUSB_RECIPIENT_INTERFACE;
	var bRequest = 9;
	var wValue = 0x0300;
	var wIndex = 0;
	return Q.nbind(device.controlTransfer, device)(
		bmRequestType, bRequest, wValue, wIndex, data
	);
}
github simoneb / grunt-awsebtdeploy / tasks / awsebtdeploy.js View on Github external
function wrapAWS(eb, s3) {
    return {
      describeApplications: Q.nbind(eb.describeApplications, eb),
      describeEnvironments: Q.nbind(eb.describeEnvironments, eb),
      putS3Object: Q.nbind(s3.putObject, s3),
      createApplicationVersion: Q.nbind(eb.createApplicationVersion, eb),
      updateEnvironment: Q.nbind(eb.updateEnvironment, eb),
      createConfigurationTemplate: Q.nbind(eb.createConfigurationTemplate, eb),
      swapEnvironmentCNAMEs: Q.nbind(eb.swapEnvironmentCNAMEs, eb),
      createEnvironment: Q.nbind(eb.createEnvironment, eb)
    };
  }
github azukiapp / azk / lib / azk / utils / index.js View on Github external
newMod[method] = function() {
        for (var args = [],
            $__2 = 0; $__2 < arguments.length; $__2++)
          args[$__2] = arguments[$__2];
        return Q.nbind(original, this).apply(null, $traceurRuntime.toObject(args));
      };
    }));