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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ const number = function (val) {
* @private * @private
*/ */
const integer = function (val) { 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 * @private
*/ */
const inArray = function (val, list) { const inArray = function (val, list) {
return list.indexOf(val) !== -1; return list.includes(val);
}; };
/** /**