13 lines
213 B
JavaScript
13 lines
213 B
JavaScript
"use strict";
|
|
|
|
module.exports = function (value) {
|
|
try {
|
|
value = Number(value);
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
if (isNaN(value)) return false;
|
|
if (Math.abs(value) > 8.64e16) return false;
|
|
return true;
|
|
};
|