Add is.safeInteger() (#22)

This commit is contained in:
Brandon Smith 2017-10-17 11:19:17 -04:00 committed by Giora Guttsait
parent dc3b6ff86b
commit 00974a2fe9
3 changed files with 18 additions and 2 deletions

View file

@ -124,6 +124,7 @@ const primitiveTypes = new Set([
is.primitive = x => is.null(x) || primitiveTypes.has(typeof x);
is.integer = Number.isInteger;
is.safeInteger = Number.isSafeInteger;
is.plainObject = x => {
// From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js