]> git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js
fc77287f6176ff9e1f60549c485a0d8b046461fc
[rbdr/dotfiles] / atom / packages / vim-mode / node_modules / grim / node_modules / emissary / node_modules / es6-weak-map / node_modules / es5-ext / math / log10 / shim.js
1 'use strict';
2
3 var log = Math.log, LOG10E = Math.LOG10E;
4
5 module.exports = function (x) {
6 if (isNaN(x)) return NaN;
7 x = Number(x);
8 if (x < 0) return NaN;
9 if (x === 0) return -Infinity;
10 if (x === 1) return 0;
11 if (x === Infinity) return Infinity;
12
13 return log(x) * LOG10E;
14 };