File: shim.js

package info (click to toggle)
node-assert 2.0.0%2B~cs3.9.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 496 kB
  • sloc: javascript: 4,088; makefile: 8
file content (16 lines) | stat: -rw-r--r-- 387 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict';

var define = require('define-properties');
var getPolyfill = require('./polyfill');

/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */

module.exports = function shimNumberIsNaN() {
	var polyfill = getPolyfill();
	define(Number, { isNaN: polyfill }, {
		isNaN: function testIsNaN() {
			return Number.isNaN !== polyfill;
		}
	});
	return polyfill;
};