shim.js 387 B

12345678910111213141516
  1. 'use strict';
  2. var define = require('define-properties');
  3. var getPolyfill = require('./polyfill');
  4. /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
  5. module.exports = function shimNumberIsNaN() {
  6. var polyfill = getPolyfill();
  7. define(Number, { isNaN: polyfill }, {
  8. isNaN: function testIsNaN() {
  9. return Number.isNaN !== polyfill;
  10. }
  11. });
  12. return polyfill;
  13. };