Codota Logo For Javascript
bind
Code IndexAdd Codota to your IDE (free)

How to use
bind
function

Best JavaScript code snippets using bind(Showing top 15 results out of 3,411)

origin: Flood-UI/flood

constructor() {
  super();

  METHODS_TO_BIND.forEach(method => {
   this[method] = this[method].bind(this);
  });
 }
origin: Aaaaaaaty/blog

function drawBezier(ctx, origin_nodes) {
  if(t > 1) {
    isPrinting = false
    return
  }
  isPrinting = true
  var nodes = origin_nodes
  t += 0.01
  ctx.clearRect(0, 0, canvas.width, canvas.height)
  drawnode(nodes)
  window.requestAnimationFrame(drawBezier.bind(this, ctx, nodes))
}
origin: GladysAssistant/Gladys

/**
 * @description Initialiaze service with dependencies and connect to devices.
 * @example
 * connect();
 */
function connect() {
 // Loads MQTT service
 this.mqttService = this.gladys.service.getService('mqtt');

 // Subscribe to Tasmota topics
 this.mqttService.device.subscribe('stat/+/+', this.handleMqttMessage.bind(this));
 this.mqttService.device.subscribe('tele/+/+', this.handleMqttMessage.bind(this));
}
origin: GladysAssistant/Gladys

/**
 * @description Add node
 * @example
 * zwave.removeNode();
 */
function removeNode() {
 logger.debug(`Zwave : Entering exclusion mode`);
 this.zwave.removeNode();
 setTimeout(this.cancelControllerCommand.bind(this), REMOVE_NODE_TIMEOUT);
}
origin: Flood-UI/flood

constructor(props) {
  super(props);

  this.sortableListRef = null;
  this.state = {
   listOffset: null,
   items: props.items,
  };

  methodsToBind.forEach(method => {
   this[method] = this[method].bind(this);
  });
 }
origin: Flood-UI/flood

fetchCurrentTransferSummary() {
  if (this.pollTimeout != null) {
   clearTimeout(this.pollTimeout);
  }

  this.services.clientGatewayService
   .fetchTransferSummary(transferSummaryMethodCallConfig)
   .then(this.handleFetchTransferSummarySuccess.bind(this))
   .catch(this.handleFetchTransferSummaryError.bind(this));
 }
origin: Flood-UI/flood

constructor(...serviceConfig) {
  super(...serviceConfig);

  this.count = Object.assign({}, INITIAL_COUNT_VALUE);
  this.ready = false;

  this.db = this.loadDatabase();

  this.emitUpdate = _.debounce(this.emitUpdate.bind(this), 100);
  this.countNotifications();
 }
origin: GladysAssistant/Gladys

/**
 * @description Listen.
 * @example
 * xiaomi.listen();
 */
function listen() {
 this.socket = this.dgram.createSocket({ type: 'udp4', reuseAddr: true });
 this.socket.on('listening', eventFunctionWrapper(this.listening.bind(this)));
 this.socket.on('message', eventFunctionWrapper(this.onMessage.bind(this)));
 //  this.socket.on('data.weather', this.addTemperatureSensor.bind(this));
 this.socket.bind(SERVER_PORT);
}
origin: Flood-UI/flood

initReader() {
  this.reader.on('items', this.handleFeedItems.bind(this));
  this.reader.on('error', error => {
   console.log('Feed reader error:', error);
  });
  this.reader.start();
 }
origin: GladysAssistant/Gladys

constructor(session) {
  this.session = session;
  this.session.dispatcher.addListener('GLADYS_GATEWAY_CONNECTED', this.emptyQueue.bind(this));
  this.queue = [];
 }
origin: Blizzard/node-rdkafka

this.consumer.once('ready', function() {
   // This is the way Node.js does it
   // https://github.com/nodejs/node/blob/master/lib/fs.js#L1733
   this._read(size);
  }.bind(this));
origin: GladysAssistant/Gladys

constructor(props) {
  super(props);

  this.state = {
   loading: true
  };

  this.selectFeature = this.selectFeature.bind(this);
  this.addFeature = this.addFeature.bind(this);
  this.deleteFeature = this.deleteFeature.bind(this);
  this.updateDeviceProperty = this.updateDeviceProperty.bind(this);
  this.updateFeatureProperty = this.updateFeatureProperty.bind(this);
  this.saveDevice = this.saveDevice.bind(this);
 }
origin: Flood-UI/flood

constructor() {
  super();

  this.tooltipRef = null;

  METHODS_TO_BIND.forEach(method => {
   this[method] = this[method].bind(this);
  });
 }
origin: Flood-UI/flood

constructor() {
  super();

  this.focusedCell = null;
  this.focusedCellWidth = null;
  this.isMouseDown = false;
  this.lastMouseX = null;

  methodsToBind.forEach(method => {
   this[method] = this[method].bind(this);
  });
 }
origin: GladysAssistant/Gladys

constructor(props) {
  super(props);

  this.state = {
   loading: true
  };

  this.selectFeature = this.selectFeature.bind(this);
  this.addFeature = this.addFeature.bind(this);
  this.deleteFeature = this.deleteFeature.bind(this);
  this.updateDeviceProperty = this.updateDeviceProperty.bind(this);
  this.updateFeatureProperty = this.updateFeatureProperty.bind(this);
  this.saveDevice = this.saveDevice.bind(this);
 }
bind

Popular in JavaScript

  • debug
    small debugging utility
  • webpack
    Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • readable-stream
    Streams3, a user-land copy of the stream library from Node.js
  • body-parser
    Node.js body parsing middleware
  • crypto
  • axios
    Promise based HTTP client for the browser and node.js
  • aws-sdk
    AWS SDK for JavaScript
  • moment
    Parse, validate, manipulate, and display dates
  • Top plugins for WebStorm
    The challenge is finding the best plugins for JavaScript development on Intellij IDEs. Who wants to sit there and go over hundreds of plugins to pick the best?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJavascript Code Index
Get Codota for your IDE now