Sha256: e3221c570f9a7f052c9d34322346b78e14a68f58a38b85e7b010aa50245ea5f7

Contents?: true

Size: 474 Bytes

Versions: 109

Compression:

Stored size: 474 Bytes

Contents

/**
 * Slice reference.
 */

var slice = [].slice;

/**
 * Bind `obj` to `fn`.
 *
 * @param {Object} obj
 * @param {Function|String} fn or string
 * @return {Function}
 * @api public
 */

module.exports = function(obj, fn){
  if ('string' == typeof fn) fn = obj[fn];
  if ('function' != typeof fn) throw new Error('bind() requires a function');
  var args = slice.call(arguments, 2);
  return function(){
    return fn.apply(obj, args.concat(slice.call(arguments)));
  }
};

Version data entries

109 entries across 107 versions & 5 rubygems

Version Path
ilog-0.4.1 node_modules/component-bind/index.js
ilog-0.4.0 node_modules/component-bind/index.js
ilog-0.3.3 node_modules/component-bind/index.js
blackboard-3.1.9 lib/site_template/node_modules/component-bind/index.js
flok-0.0.105 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.103 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.102 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
gulp_assets-1.0.0.pre.5 template/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/component-bind/index.js
gulp_assets-1.0.0.pre.4 template/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/component-bind/index.js
gulp_assets-1.0.0.pre.3 template/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.101 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.100 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.99 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.98 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.97 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.96 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.95 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.94 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.93 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js
flok-0.0.92 spec/iface/driver/assets/node_modules/socket.io/node_modules/socket.io-client/node_modules/component-bind/index.js