Sha256: fcc728fd1b296a34d792eff35d9b641975d6bd641dcdf15066a3ff79dce7eb2f

Contents?: true

Size: 613 Bytes

Versions: 243

Compression:

Stored size: 613 Bytes

Contents

'use strict';

var GetIntrinsic = require('get-intrinsic');

var $TypeError = GetIntrinsic('%TypeError%');

var Get = require('./Get');
var IsCallable = require('./IsCallable');
var Type = require('./Type');

// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance

module.exports = function OrdinaryHasInstance(C, O) {
	if (!IsCallable(C)) {
		return false;
	}
	if (Type(O) !== 'Object') {
		return false;
	}
	var P = Get(C, 'prototype');
	if (Type(P) !== 'Object') {
		throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
	}
	return O instanceof C;
};

Version data entries

243 entries across 27 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.32 node_modules/es-abstract/2023/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2019/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2018/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2016/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2020/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2015/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2022/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2017/OrdinaryHasInstance.js
immosquare-cleaner-0.1.32 node_modules/es-abstract/2021/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2023/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2015/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2021/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2018/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2022/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2019/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2016/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2020/OrdinaryHasInstance.js
immosquare-cleaner-0.1.31 node_modules/es-abstract/2017/OrdinaryHasInstance.js
immosquare-cleaner-0.1.30 node_modules/es-abstract/2023/OrdinaryHasInstance.js
immosquare-cleaner-0.1.30 node_modules/es-abstract/2015/OrdinaryHasInstance.js