UNPKG

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