Sha256: 686a8a64bb761c72fc2c2bad015384b02cb4c1fb4bc812e9993bbde569f51fbe

Contents?: true

Size: 623 Bytes

Versions: 40

Compression:

Stored size: 623 Bytes

Contents

'use strict';
var $             = require('./$')
  , isObject      = require('./$.is-object')
  , HAS_INSTANCE  = require('./$.wks')('hasInstance')
  , FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
  if(typeof this != 'function' || !isObject(O))return false;
  if(!isObject(this.prototype))return O instanceof this;
  // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
  while(O = $.getProto(O))if(this.prototype === O)return true;
  return false;
}});

Version data entries

40 entries across 18 versions & 7 rubygems

Version Path
ilog-0.4.1 node_modules/core-js/modules/es6.function.has-instance.js
ilog-0.4.1 node_modules/core-js/library/modules/es6.function.has-instance.js
ilog-0.4.0 node_modules/core-js/modules/es6.function.has-instance.js
ilog-0.4.0 node_modules/core-js/library/modules/es6.function.has-instance.js
ilog-0.3.3 node_modules/core-js/modules/es6.function.has-instance.js
ilog-0.3.3 node_modules/core-js/library/modules/es6.function.has-instance.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/fbjs/node_modules/core-js/library/modules/es6.function.has-instance.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/fbjs/node_modules/core-js/modules/es6.function.has-instance.js
locomotivecms-3.4.0 app/javascript/node_modules/fbjs/node_modules/core-js/modules/es6.function.has-instance.js
locomotivecms-3.4.0 app/javascript/node_modules/fbjs/node_modules/core-js/library/modules/es6.function.has-instance.js
cortex-0.1.3 spec/dummy/node_modules/fbjs/node_modules/core-js/library/modules/es6.function.has-instance.js
cortex-0.1.3 spec/dummy/node_modules/fbjs/node_modules/core-js/modules/es6.function.has-instance.js
lanes-0.8.0 node_modules/core-js/library/modules/es6.function.has-instance.js
lanes-0.8.0 node_modules/core-js/modules/es6.function.has-instance.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/core-js/modules/es6.function.has-instance.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/core-js/library/modules/es6.function.has-instance.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/core-js/modules/es6.function.has-instance.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/core-js/library/modules/es6.function.has-instance.js
babel-schmooze-sprockets-0.1.3 node_modules/core-js/modules/es6.function.has-instance.js
babel-schmooze-sprockets-0.1.3 node_modules/core-js/library/modules/es6.function.has-instance.js