Add javascript Number consts. (#1965)

* Add javascript Number consts.

* Add tests
This commit is contained in:
Richard Dodd (dodj)
2020-01-21 16:14:50 +00:00
committed by Alex Crichton
parent 450c477197
commit bb066e68a5
3 changed files with 99 additions and 1 deletions

View File

@ -0,0 +1,22 @@
exports.const_epsilon = function() {
return Number.EPSILON;
};
exports.const_max_safe_integer = function() {
return Number.MAX_SAFE_INTEGER;
};
exports.const_max_value = function() {
return Number.MAX_VALUE;
};
exports.const_min_safe_integer = function() {
return Number.MIN_SAFE_INTEGER;
};
exports.const_min_value = function() {
return Number.MIN_VALUE;
};
exports.const_negative_infinity = function() {
return Number.NEGATIVE_INFINITY;
};
exports.const_positive_infinity = function() {
return Number.POSITIVE_INFINITY;
};