Sha256: 26bf0a7b691fc9541b9d5c2e59ffb9e47480029ae5872b4463da733bd79ffc86
Contents?: true
Size: 556 Bytes
Versions: 112
Compression:
Stored size: 556 Bytes
Contents
'use strict'; var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var isNaN = require('../../helpers/isNaN'); var Type = require('../Type'); // https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal module.exports = function NumberEqual(x, y) { if (Type(x) !== 'Number' || Type(y) !== 'Number') { throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); } if (isNaN(x) || isNaN(y)) { return false; } // shortcut for the actual spec mechanics return x === y; };
Version data entries
112 entries across 30 versions & 4 rubygems