Add is.withinRange

This commit is contained in:
glhrmv 2017-09-22 20:06:43 +01:00
parent 103c5afe6f
commit e209990682
2 changed files with 9 additions and 0 deletions

View file

@ -148,4 +148,6 @@ const typedArrayTypes = new Set([
]);
is.typedArray = x => typedArrayTypes.has(getObjectType(x));
is.withinRange = (x, arr) => (x > Math.min.apply(Math, arr)) && (x < Math.max.apply(Math, arr));
module.exports = is;