mirror of
https://github.com/lovell/sharp.git
synced 2025-07-14 12:50:12 +02:00
Simplify is helpers (#2244)
This commit is contained in:
parent
760550ca0d
commit
7717516d1d
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user