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

@ -128,6 +128,11 @@ is.asyncFunction(() => {});
JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`.
##### .integer(value)
##### .safeInteger(value)
Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
##### .plainObject(value)
An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.