Simplify is helpers (#2244)

This commit is contained in:
Mikhail Bodrov
2020-06-05 11:48:26 +03:00
committed by GitHub
parent 760550ca0d
commit 7717516d1d

View File

@@ -69,7 +69,7 @@ const number = function (val) {
* @private
*/
const integer = function (val) {
return number(val) && val % 1 === 0;
return Number.isInteger(val);
};
/**
@@ -85,7 +85,7 @@ const inRange = function (val, min, max) {
* @private
*/
const inArray = function (val, list) {
return list.indexOf(val) !== -1;
return list.includes(val);
};
/**