polyfills.js (646B)
1 "use strict"; 2 3 // TODO: remove these polyfills as soon as we have a build process that transpiles the code to ES5 4 // Polyfill for IE 11 (Number.isFinite is used in `complex.js`) 5 // source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite 6 Number.isFinite = Number.isFinite || function (value) { 7 return typeof value === 'number' && isFinite(value); 8 }; // Polyfill for IE 11 9 // source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN 10 11 12 Number.isNaN = Number.isNaN || function (value) { 13 return value !== value; // eslint-disable-line no-self-compare 14 };