https://github.com/lisniuse/is-pro
This is a general-purpose check library inherited from is.js
https://github.com/lisniuse/is-pro
Last synced: about 1 month ago
JSON representation
This is a general-purpose check library inherited from is.js
- Host: GitHub
- URL: https://github.com/lisniuse/is-pro
- Owner: lisniuse
- License: mit
- Created: 2019-03-11T07:15:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-07T14:19:49.000Z (almost 6 years ago)
- Last Synced: 2025-03-16T05:34:45.083Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 189 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ispro.js
This is a general-purpose check library inherited from [is.js](https://github.com/arasatasaygin/is.js)
[](http://badge.fury.io/js/ispro)
[](https://www.npmjs.com/package/ispro)
## Features
- No dependencies
- AMD, Node & browser ready## Installation
### Node.js
```bash
npm install ispro
```### Bower
```bash
bower install ispro
```### Yarn
```bash
yarn install ispro
```## Importing
```javascript
// Using Node.js `require()`
const is = require('ispro');// Using ES6 imports
import is from 'ispro';
```## Build
```bash
npm run build
```## Test
```bash
npm test
```## Types overview
Type | Presence | RegExp | String | Arithmetic | Object | Array | Environment | Time | Configuration | Actual
---|---|---|---|---|---|---|---|---|---|---
arguments | empty | url | include | equal | propertyCount | inArray | ie | today | setRegexp | cnBankCard
array | existy | email | upperCase | even | propertyDefined | sorted | edge | yesterday | - | cnCellNum
boolean | truthy | creditCard | lowerCase | odd | windowObject | - | chrome | tomorrow | - | cnIdCode
date | falsy | alphaNumeric | startWith | positive | domNode | - | firefox | past | - | cnName
error | space | timeString | endWith | negative | arrayBuffer | - | opera | future | - | cnTelNum
function | valid | dateString | capitalized | above | arrayLike | - | safari | day | - | cnZipCode
nan | - | usZipCode | palindrome | under | objectLike | - | ios | month | - | password
null | - | caPostalCode | - | within | length | - | iphone | year | - | username
number | - | ukPostCode | - | decimal | equal | - | ipad | leapYear | - | QQ
object | - | nanpPhone | - | integer | - | - | ipod | weekday | - | -
json | - | eppPhone | - | finite | - | - | android | weekend | - | -
regexp | - | socialSecurityNumber | - | infinite | - | - | androidPhone | inDateRange | - | -
string | - | affirmative | - | float | - | - | androidTablet | inLastWeek | - | -
char | - | hexadecimal | - | - | - | - | blackberry | inLastMonth | - | -
undefined | - | hexColor | - | - | - | - | windowsPhone | inLastYear| - | -
sameType | - | ip | - | - | - | - | windowsTablet | inNextWeek | - | -
buffer | - | ipv4 | - | - | - | - | windows | inNextMonth | - | -
map | - | ipv6 | - | - | - | - | mac | inNextYear | - | -
plainObject | - | base64 | - | - | - | - | linux | quarterOfYear | - | -
set | - | ascii | - | - | - | - | desktop | dayLightSavingTime | - | -
symbol | - | macAddress | - | - | - | - | mobile | - | - | -
\- | - | magnetURL | - | - | - | - | tablet | - | - | -
\- | - | md5 | - | - | - | - | online | - | - | -
\- | - | uuid | - | - | - | - | offline | - | - | -
\- | - | dataURI | - | - | - | - | touchDevice | - | - | -## Api description
method | description
---|---
is.typeof(value: any) | Outputs the type of a value, and the type returned is an array.
is.not\[method\](value: any) | Determine whether it is contrary to the given value.
is.all\[method\](value: any) | Determine whether the given value fully satisfies the condition.
is.any\[method\](value: any) | Determine whether a given value partially satisfies the condition.Type checks
===========is.arguments(value:any)
-----------------------
#### Checks if the given value type is arguments.
interfaces: not, all, any```javascript
var getArguments = function() {
return arguments;
};
var arguments = getArguments();is.arguments(arguments);
=> trueis.not.arguments({foo: 'bar'});
=> trueis.all.arguments(arguments, 'bar');
=> falseis.any.arguments(['foo'], arguments);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.arguments([arguments, 'foo', 'bar']);
=> false
```is.array(value:any)
-------------------
#### Checks if the given value type is array.
interfaces: not, all, any```javascript
is.array(['foo', 'bar', 'baz']);
=> trueis.not.array({foo: 'bar'});
=> trueis.all.array(['foo'], 'bar');
=> falseis.any.array(['foo'], 'bar');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.array([[1, 2], 'foo', 'bar']);
=> false
```is.boolean(value:any)
---------------------
#### Checks if the given value type is boolean.
interfaces: not, all, any```javascript
is.boolean(true);
=> trueis.not.boolean({foo: 'bar'});
=> trueis.all.boolean(true, 'bar');
=> falseis.any.boolean(true, 'bar');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.boolean([true, 'foo', 'bar']);
=> false
```is.date(value:any)
------------------
#### Checks if the given value type is date.
interfaces: not, all, any```javascript
is.date(new Date());
=> trueis.not.date({foo: 'bar'});
=> trueis.all.date(new Date(), 'bar');
=> falseis.any.date(new Date(), 'bar');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.date([new Date(), 'foo', 'bar']);
=> false
```is.error(value:any)
-------------------
#### Checks if the given value type is error.
interfaces: not, all, any```javascript
is.error(new Error());
=> trueis.not.error({foo: 'bar'});
=> trueis.all.error(new Error(), 'bar');
=> falseis.any.error(new Error(), 'bar');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.error([new Error(), 'foo', 'bar']);
=> false
```is.function(value:any)
----------------------
#### Checks if the given value type is function.
interfaces: not, all, any```javascript
is.function(toString);
=> trueis.not.function({foo: 'bar'});
=> trueis.all.function(toString, 'bar');
=> falseis.any.function(toString, 'bar');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.function([toString, 'foo', 'bar']);
=> false
```is.nan(value:any)
-----------------
#### Checks if the given value type is NaN.
interfaces: not, all, any```javascript
is.nan(NaN);
=> trueis.not.nan(42);
=> trueis.all.nan(NaN, 1);
=> falseis.any.nan(NaN, 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.nan([NaN, 'foo', 1]);
=> false
```is.null(value:any)
------------------
#### Checks if the given value type is null.
interfaces: not, all, any```javascript
is.null(null);
=> trueis.not.null(42);
=> trueis.all.null(null, 1);
=> falseis.any.null(null, 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.null([null, 'foo', 1]);
=> false
```is.number(value:any)
--------------------
#### Checks if the given value type is number.
interfaces: not, all, any```javascript
is.number(42);
=> trueis.number(NaN);
=> falseis.not.number('42');
=> trueis.all.number('foo', 1);
=> falseis.any.number({}, 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.number([42, 'foo', 1]);
=> false
```is.object(value:any)
--------------------
#### Checks if the given value type is object.
interfaces: not, all, any```javascript
is.object({foo: 'bar'});
=> true// functions are also returning as true
is.object(toString);
=> trueis.not.object('foo');
=> trueis.all.object({}, 1);
=> falseis.any.object({}, 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.object([{}, new Object()]);
=> true
```is.json(value:any)
--------------------
#### Checks if the given value type is pure json object.
interfaces: not, all, any```javascript
is.json({foo: 'bar'});
=> true// functions are returning as false
is.json(toString);
=> falseis.not.json([]);
=> trueis.all.json({}, 1);
=> falseis.any.json({}, 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.json([{}, {foo: 'bar'}]);
=> true
```is.regexp(value:any)
--------------------
#### Checks if the given value type is RegExp.
interfaces: not, all, any```javascript
is.regexp(/test/);
=> trueis.not.regexp(['foo']);
=> trueis.all.regexp(/test/, 1);
=> falseis.any.regexp(new RegExp('ab+c'), 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.regexp([{}, /test/]);
=> false
```is.string(value:any)
--------------------
#### Checks if the given value type is string.
interfaces: not, all, any```javascript
is.string('foo');
=> trueis.not.string(['foo']);
=> trueis.all.string('foo', 1);
=> falseis.any.string('foo', 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.string([{}, 'foo']);
=> false
```is.char(value:any)
--------------------
#### Checks if the given value type is char.
interfaces: not, all, any```javascript
is.char('f');
=> trueis.not.char(['foo']);
=> trueis.all.char('f', 1);
=> falseis.any.char('f', 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.char(['f', 'o', 'o']);
=> true
```is.undefined(value:any)
-----------------------
#### Checks if the given value type is undefined.
interfaces: not, all, any```javascript
is.undefined(undefined);
=> trueis.not.undefined(null);
=> trueis.all.undefined(undefined, 1);
=> falseis.any.undefined(undefined, 2);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.undefined([{}, undefined]);
=> false
```is.sameType(value:any, other:any)
---------------------------------
#### Checks if the given value types are same type.
interface: not```javascript
is.sameType(42, 7);
=> trueis.sameType(42, '7');
=> falseis.not.sameType(42, 7);
=> false
```is.buffer(value:any)
---------------------------------
#### Checks if `value` is a buffer.
interface: not```javascript
is.buffer(new Buffer(2));
=> trueis.buffer(true);
=> false
```is.map(value:any)
---------------------------------
#### Checks if `value` is classified as a `Map` object.
interface: not```javascript
is.map(new Map());
=> trueis.map('123456');
=> false
```is.plainObject(value:any)
---------------------------------
#### Checks if value is a plain object, that is,
interface: not```javascript
is.plainObject({});
=> trueis.plainObject('123456');
=> false
```is.set(value:any)
---------------------------------
#### Checks if `value` is classified as a `Set` object.
interface: not```javascript
is.set(new Set());
=> trueis.set('123456');
=> false
```is.symbol(value:any)
---------------------------------
#### Checks if `value` is classified as a `Symbol` object.
interface: not```javascript
is.symbol(Symbol());
=> trueis.symbol('123456');
=> false
```Presence checks
===============is.empty(value:array|object|string)
-----------------------------------
#### Checks if the given value is empty.
interfaces: not, all, any```javascript
is.empty({});
=> trueis.empty([]);
=> trueis.empty('');
=> trueis.not.empty(['foo']);
=> trueis.all.empty('', {}, ['foo']);
=> falseis.any.empty([], 42);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.empty([{}, 'foo']);
=> false
```is.existy(value:any)
--------------------
#### Checks if the given value is existy. (not null or undefined)
interfaces: not, all, any```javascript
is.existy({});
=> trueis.existy(null);
=> falseis.not.existy(undefined);
=> trueis.all.existy(null, ['foo']);
=> falseis.any.existy(undefined, 42);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.existy([{}, 'foo']);
=> true
```is.truthy(value:any)
--------------------
#### Checks if the given value is truthy. (existy and not false)
interfaces: not, all, any```javascript
is.truthy(true);
=> trueis.truthy(null);
=> falseis.not.truthy(false);
=> trueis.all.truthy(null, true);
=> falseis.any.truthy(undefined, true);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.truthy([{}, true]);
=> true
```is.falsy(value:any)
-------------------
#### Checks if the given value is falsy.
interfaces: not, all, any```javascript
is.falsy(false);
=> trueis.falsy(null);
=> trueis.not.falsy(true);
=> trueis.all.falsy(null, false);
=> trueis.any.falsy(undefined, true);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.falsy([false, true, undefined]);
=> false
```is.space(value:any)
----------------------
#### Checks if the given value is space.
interfaces: not, all, any```javascript
is.space(' ');
=> trueis.space('foo');
=> falseis.not.space(true);
=> trueis.all.space(' ', 'foo');
=> falseis.any.space(' ', true);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.space([' ', 'foo', undefined]);
=> false
```is.valid(value: any)
----------------------
#### Checks if the given value is valid.
interfaces: not, all, any```javascript
is.valid(1);
=> trueis.valid(null);
=> falseis.not.valid(null);
=> trueis.all.valid(mull, 'foo');
=> falseis.any.valid(null, true);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.valid([' ', 'foo', undefined]);
=> false
```RegExp checks
=============is.url(value:any)
-----------------
#### Checks if the given value matches url regexp.
interfaces: not, all, any```javascript
is.url('http://www.test.com');
=> trueis.url('foo');
=> falseis.not.url(true);
=> trueis.all.url('http://www.test.com', 'foo');
=> falseis.any.url('http://www.test.com', true);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.url(['http://www.test.com', 'foo', undefined]);
=> false
```is.email(value:any)
-------------------
#### Checks if the given value matches email regexp.
interfaces: not, all, any```javascript
is.email('[email protected]');
=> trueis.email('foo');
=> falseis.not.email('foo');
=> trueis.all.email('[email protected]', 'foo');
=> falseis.any.email('[email protected]', 'foo');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.email(['[email protected]', 'foo', undefined]);
=> false
```is.creditCard(value:any)
------------------------
#### Checks if the given value matches credit card regexp.
interfaces: not, all, any```javascript
is.creditCard(378282246310005);
=> trueis.creditCard(123);
=> falseis.not.creditCard(123);
=> trueis.all.creditCard(378282246310005, 123);
=> falseis.any.creditCard(378282246310005, 123);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.creditCard([378282246310005, 123, undefined]);
=> false
```is.alphaNumeric(value:any)
--------------------------
#### Checks if the given value matches alpha numeric regexp.
interfaces: not, all, any```javascript
is.alphaNumeric('alphaNu3er1k');
=> trueis.alphaNumeric('*?');
=> falseis.not.alphaNumeric('*?');
=> trueis.all.alphaNumeric('alphaNu3er1k', '*?');
=> falseis.any.alphaNumeric('alphaNu3er1k', '*?');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.alphaNumeric(['alphaNu3er1k', '*?']);
=> false
```is.timeString(value:any)
------------------------
#### Checks if the given value matches time string regexp.
interfaces: not, all, any```javascript
is.timeString('13:45:30');
=> trueis.timeString('90:90:90');
=> falseis.not.timeString('90:90:90');
=> trueis.all.timeString('13:45:30', '90:90:90');
=> falseis.any.timeString('13:45:30', '90:90:90');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.timeString(['13:45:30', '90:90:90']);
=> false
```is.dateString(value:any)
------------------------
#### Checks if the given value matches date string regexp.
interfaces: not, all, any```javascript
is.dateString('11/11/2011');
=> trueis.dateString('10-21-2012');
=> trueis.dateString('90/11/2011');
=> falseis.not.dateString('90/11/2011');
=> trueis.all.dateString('11/11/2011', '90/11/2011');
=> falseis.any.dateString('11-11-2011', '90/11/2011');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.dateString(['11/11/2011', '90/11/2011']);
=> false
```is.usZipCode(value:any)
-----------------------
#### Checks if the given value matches US zip code regexp.
interfaces: not, all, any```javascript
is.usZipCode('02201-1020');
=> trueis.usZipCode('123');
=> falseis.not.usZipCode('123');
=> trueis.all.usZipCode('02201-1020', '123');
=> falseis.any.usZipCode('02201-1020', '123');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.usZipCode(['02201-1020', '123']);
=> false
```is.caPostalCode(value:any)
--------------------------
#### Checks if the given value matches Canada postal code regexp.
interfaces: not, all, any```javascript
is.caPostalCode('L8V3Y1');
=> trueis.caPostalCode('L8V 3Y1');
=> trueis.caPostalCode('123');
=> falseis.not.caPostalCode('123');
=> trueis.all.caPostalCode('L8V3Y1', '123');
=> falseis.any.caPostalCode('L8V3Y1', '123');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.caPostalCode(['L8V3Y1', '123']);
=> false
```is.ukPostCode(value:any)
------------------------
#### Checks if the given value matches UK post code regexp.
interfaces: not, all, any```javascript
is.ukPostCode('B184BJ');
=> trueis.ukPostCode('123');
=> falseis.not.ukPostCode('123');
=> trueis.all.ukPostCode('B184BJ', '123');
=> falseis.any.ukPostCode('B184BJ', '123');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.ukPostCode(['B184BJ', '123']);
=> false
```is.nanpPhone(value:any)
-----------------------
#### Checks if the given value matches North American numbering plan phone regexp.
interfaces: not, all, any```javascript
is.nanpPhone('609-555-0175');
=> trueis.nanpPhone('123');
=> falseis.not.nanpPhone('123');
=> trueis.all.nanpPhone('609-555-0175', '123');
=> falseis.any.nanpPhone('609-555-0175', '123');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.nanpPhone(['609-555-0175', '123']);
=> false
```is.eppPhone(value:any)
----------------------
#### Checks if the given value matches extensible provisioning protocol phone regexp.
interfaces: not, all, any```javascript
is.eppPhone('+90.2322456789');
=> trueis.eppPhone('123');
=> falseis.not.eppPhone('123');
=> trueis.all.eppPhone('+90.2322456789', '123');
=> falseis.any.eppPhone('+90.2322456789', '123');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.eppPhone(['+90.2322456789', '123']);
=> false
```is.socialSecurityNumber(value:any)
----------------------------------
#### Checks if the given value matches social security number regexp.
interfaces: not, all, any```javascript
is.socialSecurityNumber('017-90-7890');
=> trueis.socialSecurityNumber('017907890');
=> trueis.socialSecurityNumber('123');
=> falseis.not.socialSecurityNumber('123');
=> trueis.all.socialSecurityNumber('017-90-7890', '123');
=> falseis.any.socialSecurityNumber('017907890', '123');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.socialSecurityNumber(['017-90-7890', '123']);
=> false
```is.affirmative(value:any)
-------------------------
#### Checks if the given value matches affirmative regexp.
interfaces: not, all, any```javascript
is.affirmative('yes');
=> trueis.affirmative('no');
=> falseis.not.affirmative('no');
=> trueis.all.affirmative('yes', 'no');
=> falseis.any.affirmative('yes', 'no');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.affirmative(['yes', 'y', 'true', 't', 'ok', 'okay']);
=> true
```is.hexadecimal(value:any)
-------------------------
#### Checks if the given value matches hexadecimal regexp.
interfaces: not, all, any```javascript
is.hexadecimal('f0f0f0');
=> trueis.hexadecimal('0xf0f0f0');
=> trueis.hexadecimal(2.5);
=> falseis.not.hexadecimal('string');
=> trueis.all.hexadecimal('ff', 'f50');
=> trueis.any.hexadecimal('0xff5500', true);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.hexadecimal(['fff', '333', 'f50']);
=> true
```is.hexColor(value:any)
-------------------------
#### Checks if the given value matches hexcolor regexp.
interfaces: not, all, any```javascript
is.hexColor('#333');
=> trueis.hexColor('#3333');
=> falseis.not.hexColor(0.5);
=> trueis.all.hexColor('fff', 'f50');
=> trueis.any.hexColor('ff5500', 0.5);
=> false// 'all' and 'any' interfaces can also take array parameter
is.all.hexColor(['fff', '333', 'f50']);
=> true
```is.ip(value:any)
-------------------------
#### Checks if the given value matches ip regexp
interfaces: not, all, any```javascript
is.ip('198.156.23.5');
=> trueis.ip('1.2..5');
=> falseis.not.ip('8:::::::7');
=> trueis.all.ip('0:1::4:ff5:54:987:C', '123.123.123.123');
=> trueis.any.ip('123.8.4.3', '0.0.0.0');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.ip(['123.123.23.12', 'A:B:C:D:E:F:0:0']);
=> true
```is.ipv4(value:any)
-------------------------
#### Checks if the given value matches ipv4 regexp
interfaces: not, all, any```javascript
is.ipv4('198.12.3.142');
=> trueis.ipv4('1.2..5');
=> falseis.not.ipv4('8:::::::7');
=> trueis.all.ipv4('198.12.3.142', '123.123.123.123');
=> trueis.any.ipv4('255.255.255.255', '850..1.4');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.ipv4(['198.12.3.142', '1.2.3']);
=> false```
is.ipv6(value: any)
-------------------------
#### Checks if the given value matches ipv6 regexp
interfaces: not, all, any```javascript
is.ipv6('2001:DB8:0:0:1::1');
=> trueis.ipv6('985.12.3.4');
=> trueis.not.ipv6('8:::::::7');
=> trueis.all.ipv6('2001:DB8:0:0:1::1', '1:50:198:2::1:2:8');
=> trueis.any.ipv6('255.255.255.255', '2001:DB8:0:0:1::1');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.ipv6(['2001:DB8:0:0:1::1', '1.2.3']);
=> false
```is.base64(value: any)
-------------------------
#### Checks if the given value matches base64 regexp
interfaces: not, all, any```javascript
is.base64('dGhpcyBpcyBhIGV4YW1wbGU=');
=> trueis.ipv6('123456');
=> false```
is.ascii(value: any)
-------------------------
#### Checks if the given value matches ascii regexp
interfaces: not, all, any```javascript
is.ascii('foobar');
=> trueis.ascii('123456');
=> false```
is.macAddress(value: any)
-------------------------
#### Checks if the given value matches macAddress regexp
interfaces: not, all, any```javascript
is.macAddress('FF:FF:FF:FF:FF:FF');
=> trueis.macAddress('123456');
=> false```
is.magnetURL(value: any)
-------------------------
#### Checks if the given value matches magnetURL regexp
interfaces: not, all, any```javascript
is.magnetURL('magnet:?xt=urn:btih:3E30322D5BFC7444B7B1D8DD42404B75D0531DFB&dn=world&tr=udp://world.com:133'');
=> trueis.magnetURL('123456');
=> false```
is.md5(value: any)
-------------------------
#### Checks if the given value matches md5 regexp
interfaces: not, all, any```javascript
is.md5('49ba59abbe56e057');
=> trueis.md5('e10adc3949ba59abbe56e057f20f883e');
=> trueis.md5('123456');
=> false```
is.uuid(value: any)
-------------------------
#### Checks if the given value matches uuid regexp
interfaces: not, all, any```javascript
is.uuid('A987FBC9-4BED-3078-CF07-9141BA07C9F3');
=> trueis.uuid('123456');
=> false```
is.dataURI(value: any)
-------------------------
#### Checks if the given value matches dataURI regexp
interfaces: not, all, any```javascript
is.dataURI('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC');
=> trueis.dataURI('123456');
=> false```
String checks
=============is.include(value:string, target:string)
-----------------------------------------
#### Checks if the given string contains a substring.
interface: not```javascript
is.include('Some text goes here', 'text');
=> trueis.include('test', 'text');
=> falseis.not.include('test', 'text');
=> true
```is.upperCase(value:string)
--------------------------
#### Checks if the given string is UPPERCASE.
interfaces: not, all, any```javascript
is.upperCase('YEAP');
=> trueis.upperCase('nope');
=> falseis.not.upperCase('Nope');
=> trueis.all.upperCase('YEAP', 'nope');
=> falseis.any.upperCase('YEAP', 'nope');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.upperCase(['YEAP', 'ALL UPPERCASE']);
=> true
```is.lowerCase(value:string)
--------------------------
#### Checks if the given string is lowercase.
interfaces: not, all, any```javascript
is.lowerCase('yeap');
=> trueis.lowerCase('NOPE');
=> falseis.not.lowerCase('Nope');
=> trueis.all.lowerCase('yeap', 'NOPE');
=> falseis.any.lowerCase('yeap', 'NOPE');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.lowerCase(['yeap', 'all lowercase']);
=> true
```is.startWith(value:string, target:string)
-------------------------------------------
#### Checks if the given string starts with substring.
interface: not```javascript
is.startWith('yeap', 'ye');
=> trueis.startWith('nope', 'ye');
=> falseis.not.startWith('nope not that', 'not');
=> true
```is.endWith(value:string, target:string)
-----------------------------------------
#### Checks if the given string ends with substring.
interfaces: not```javascript
is.endWith('yeap', 'ap');
=> trueis.endWith('nope', 'no');
=> falseis.not.endWith('nope not that', 'not');
=> trueis.endWith('yeap that one', 'one');
=> true
```is.capitalized(value:string)
---------------------------------------------
#### Checks if the given string is capitalized.
interfaces: not, all, any```javascript
is.capitalized('Yeap');
=> trueis.capitalized('nope');
=> falseis.not.capitalized('nope not capitalized');
=> trueis.not.capitalized('nope Capitalized');
=> trueis.all.capitalized('Yeap', 'All', 'Capitalized');
=> trueis.any.capitalized('Yeap', 'some', 'Capitalized');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.capitalized(['Nope', 'not']);
=> false
```is.palindrome(value:string)
---------------------------------------------
#### Checks if the given string is palindrome.
interfaces: not, all, any```javascript
is.palindrome('testset');
=> trueis.palindrome('A man, a plan, a canal - Panama!');
=> trueis.palindrome('nope');
=> falseis.not.palindrome('nope not palindrome');
=> trueis.not.palindrome('tt');
=> falseis.all.palindrome('testset', 'tt');
=> trueis.any.palindrome('Yeap', 'some', 'testset');
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.palindrome(['Nope', 'testset']);
=> false
```Arithmetic checks
=================is.equal(value:any, other:any)
------------------------------
#### Checks if the given values are equal.
interfaces: not```javascript
is.equal(42, 40 + 2);
=> trueis.equal('yeap', 'yeap');
=> trueis.equal(true, true);
=> trueis.not.equal('yeap', 'nope');
=> true
```is.even(value:number)
---------------------
#### Checks if the given value is even.
interfaces: not, all, any```javascript
is.even(42);
=> trueis.not.even(41);
=> trueis.all.even(40, 42, 44);
=> trueis.any.even(39, 42, 43);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.even([40, 42, 43]);
=> false
```is.odd(value:number)
--------------------
#### Checks if the given value is odd.
interfaces: not, all, any```javascript
is.odd(41);
=> trueis.not.odd(42);
=> trueis.all.odd(39, 41, 43);
=> trueis.any.odd(39, 42, 44);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.odd([40, 42, 43]);
=> false
```is.positive(value:number)
-------------------------
#### Checks if the given value is positive.
interfaces: not, all, any```javascript
is.positive(41);
=> trueis.not.positive(-42);
=> trueis.all.positive(39, 41, 43);
=> trueis.any.positive(-39, 42, -44);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.positive([40, 42, -43]);
=> false
```is.negative(value:number)
-------------------------
#### Checks if the given value is negative.
interfaces: not, all, any```javascript
is.negative(-41);
=> trueis.not.negative(42);
=> trueis.all.negative(-39, -41, -43);
=> trueis.any.negative(-39, 42, 44);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.negative([40, 42, -43]);
=> false
```is.above(value:number, min:number)
---------------------------
#### Checks if the given value is above minimum value.
interface: not```javascript
is.above(41, 30);
=> trueis.not.above(42, 50);
=> true
```is.under(value:number, max:number)
---------------------------
#### Checks if the given value is under maximum value.
interface: not```javascript
is.under(30, 35);
=> trueis.not.under(42, 30);
=> true
```is.within(value:number, min:number, max:number)
---------------------------------
#### Checks if the given value is within minimum and maximum values.
interface: not```javascript
is.within(30, 20, 40);
=> trueis.not.within(40, 30, 35);
=> true
```is.decimal(value:number)
------------------------
#### Checks if the given value is decimal.
interfaces: not, all, any```javascript
is.decimal(41.5);
=> trueis.not.decimal(42);
=> trueis.all.decimal(39.5, 41.5, -43.5);
=> trueis.any.decimal(-39, 42.5, 44);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.decimal([40, 42.5, -43]);
=> false
```is.integer(value:number)
------------------------
#### Checks if the given value is integer.
interfaces: not, all, any```javascript
is.integer(41);
=> trueis.not.integer(42.5);
=> trueis.all.integer(39, 41, -43);
=> trueis.any.integer(-39, 42.5, 44);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.integer([40, 42.5, -43]);
=> false
```is.finite(value:number)
-----------------------
#### Checks if the given value is finite.
interfaces: not, all, any```javascript
is.finite(41);
=> trueis.not.finite(42 / 0);
=> trueis.all.finite(39, 41, -43);
=> trueis.any.finite(-39, Infinity, 44);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.finite([Infinity, -Infinity, 42.5]);
=> false
```is.infinite(value:number)
-------------------------
#### Checks if the given value is infinite.
interfaces: not, all, any```javascript
is.infinite(Infinity);
=> trueis.not.infinite(42);
=> trueis.all.infinite(Infinity, -Infinity, -43 / 0);
=> trueis.any.infinite(-39, Infinity, 44);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.infinite([Infinity, -Infinity, 42.5]);
=> false
```Object checks
=============is.propertyCount(value:object, count:number)
-------------------------------------
#### Checks if objects' property count is equal to given count.
interface: not```javascript
is.propertyCount({this: 'is', 'sample': object}, 2);
=> trueis.propertyCount({this: 'is', 'sample': object}, 3);
=> falseis.not.propertyCount({}, 2);
=> true
```is.propertyDefined(value:object, property:string)
------------------------------------------
#### Checks if the given property is defined on object.
interface: not```javascript
is.propertyDefined({yeap: 'yeap'}, 'yeap');
=> trueis.propertyDefined({yeap: 'yeap'}, 'nope');
=> falseis.not.propertyDefined({}, 'nope');
=> true
```is.windowObject(value:any)
-----------------------------
#### Checks if the given object is window object.
interfaces: not, all, any```javascript
is.windowObject(window);
=> trueis.windowObject({nope: 'nope'});
=> falseis.not.windowObject({});
=> trueis.all.windowObject(window, {nope: 'nope'});
=> falseis.any.windowObject(window, {nope: 'nope'});
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.windowObject([window, {nope: 'nope'}]);
=> false
```is.domNode(value: any)
-----------------------------
#### Checks if the given object is a dom node.
interfaces: not, all, any```javascript
var obj = document.createElement('div');
is.domNode(obj);
=> trueis.domNode({nope: 'nope'});
=> falseis.not.domNode({});
=> trueis.all.domNode(obj, obj);
=> trueis.any.domNode(obj, {nope: 'nope'});
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.domNode([obj, {nope: 'nope'}]);
=> false
```is.arrayBuffer(value: any)
-----------------------------
#### Checks if the given object is arrayBuffer object.
interfaces: not, all, any```javascript
is.arrayBuffer(new ArrayBuffer(2));
=> trueis.arrayBuffer(true);
=> false```
is.arrayLike(value: any)
-----------------------------
#### Checks if the given object is arrayLike object.
interfaces: not, all, any```javascript
is.arrayLike([1, 2, 3]);
=> trueis.arrayLike(true);
=> false```
is.objectLike(value: any)
-----------------------------
#### Checks if the given object is objectLike object.
interfaces: not, all, any```javascript
is.objectLike([1, 2, 3]);
is.objectLike(new Date());
=> trueis.objectLike('1');
=> false```
is.length(value: any)
-----------------------------
#### Checks if the given object is length.
interfaces: not, all, any```javascript
is.length([1, 2, 3].length);
=> trueis.length(Number.MIN_VALUE);
=> false```
is.equal(value: any)
-----------------------------
#### are given values equal? supports numbers, strings, regexes, booleans, array, object
interfaces: not, all, any```javascript
is.equal({a: 1}, {a: 1});
=> trueis.equal([2], [3]);
=> false```
Array checks
============is.inArray(value:any, array)
---------------------
#### Checks if the given item is in array?
interface: not
```javascript
is.inArray(2, [1, 2, 3]);
=> trueis.inArray(4, [1, 2, 3]);
=> falseis.not.inArray(4, [1, 2, 3]);
=> true
```is.sorted(value:array, sign:string)
----------------------
#### Checks if the given array is sorted. Sign is optional parameter.
interfaces: not, all, any```javascript
is.sorted([1, 2, 3]);
=> trueis.sorted([1, 2, 4, 3]);
=> falseis.sorted([1, 1, 2, 2], '>=');
=> trueis.sorted([1, 2, 3, 4], '>');
=> trueis.sorted([4, 3, 3, 1], '<=');
=> trueis.sorted([4, 3, 2, 1], '<');
=> trueis.sorted([1, 2, 3, 3], '>');
=> falseis.not.sorted([5, 4, 3]);
=> trueis.not.sorted([5, 4, 3], '<');
=> falseis.all.sorted([1, 2], [3, 4]);
=> trueis.any.sorted([1, 2], [5, 4]);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.sorted([[1, 2], [5, 4]]);
=> false
```Environment checks
==================
#### Environment checks are not available as node module.is.ie(range:number|string)
-------------------
#### Checks if current browser is ie. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.ie();
=> true if current browser is ieis.not.ie();
=> false if current browser is ie// also supports version number
is.ie(10);
=> true if current version of ie is 10is.ie('>=10');
=> true if current version of ie is greater than or equal to 10is.not.ie('<9');
=> true if current version of ie is not less than 9
```is.chrome(range:number|string)
-----------
#### Checks if current browser is chrome. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.chrome();
=> true if current browser is chromeis.not.chrome();
=> false if current browser is chrome// also supports version number
is.chrome(50);
=> true if current version of chrome is 50is.chrome('>=40');
=> true if current version of chrome is greater than or equal to 40is.not.chrome('<30');
=> true if current version of chrome is not less than 30
```is.firefox(range:number|string)
------------
#### Checks if current browser is firefox. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.firefox();
=> true if current browser is firefoxis.not.firefox();
=> false if current browser is firefox// also supports version number
is.firefox(41);
=> true if current version of firefox is 41is.firefox('>=40');
=> true if current version of firefox is greater than or equal to 40is.not.firefox('<30');
=> true if current version of firefox is not less than 30
```is.edge(range:number|string)
------------
#### Checks if current browser is edge. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.edge();
=> true if current browser is edgeis.not.edge();
=> false if current browser is edge// also supports version number
is.edge(13);
=> true if current version of edge is 13is.edge('>=12');
=> true if current version of edge is greater than or equal to 12is.not.edge('<13');
=> true if current version of edge is not less than 13
```is.opera(range:number|string)
----------
#### Checks if current browser is opera. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.opera();
=> true if current browser is operais.not.opera();
=> false if current browser is opera// also supports version number
is.opera(36);
=> true if current version of opera is 36is.opera('>=35');
=> true if current version of opera is greater than or equal to 35is.not.opera('<20');
=> true if current version of opera is not less than 20
```is.safari(range:number|string)
-----------
#### Checks if current browser is safari. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.safari();
=> true if current browser is safariis.not.safari();
=> false if current browser is safari// also supports version number
is.safari(9);
=> true if current version of safari is 9is.safari('>=8');
=> true if current version of safari is greater than or equal to 8is.not.safari('<7');
=> true if current version of safari is not less than 7
```is.phantom(range:number|string)
-----------
#### Checks if current browser is phantomjs. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.phantom();
=> true if current browser is phantomjsis.not.phantom();
=> false if current browser is phantomjs// also supports version number
is.phantom(2);
=> true if current version of phantom is 2is.phantom('>=1');
=> true if current version of phantomjs is greater than or equal to 1is.not.phantom('<2');
=> true if current version of phantomjs is not less than 2
```is.ios()
--------
#### Checks if current device has ios.
interface: not```javascript
is.ios();
=> true if current device is iPhone, iPad or iPodis.not.ios();
=> true if current device is not iPhone, iPad or iPod
```is.iphone(range:number|string)
-----------
#### Checks if current device is iPhone. Parameter is optional version range (or number) of browser.
interface: not```javascript
is.iphone();
=> true if current device is iPhoneis.not.iphone();
=> true if current device is not iPhone// also supports version number
is.iphone(9);
=> true if current version of iPhone is 9is.iphone('>=7');
=> true if current version of iPhone is greater than or equal to 7is.not.iphone('<8');
=> true if current version of iPhone is not less than 8
```is.ipad(range:number|string)
---------
#### Checks if current device is iPad.
interface: not```javascript
is.ipad();
=> true if current device is iPadis.not.ipad();
=> true if current device is not iPad// also supports version number
is.ipad(9);
=> true if current version of iPad is 9is.ipad('>=7');
=> true if current version of iPad is greater than or equal to 7is.not.ipad('<8');
=> true if current version of iPad is not less than 8
```is.ipod(range:number|string)
---------
#### Checks if current device is iPod.
interface: not```javascript
is.ipod();
=> true if current device is iPodis.not.ipod();
=> true if current device is not iPod// also supports version number
is.ipod(7);
=> true if current version of iPod is 7is.ipod('>=5');
=> true if current version of iPod is greater than or equal to 5is.not.ipod('<5');
=> true if current version of iPod is not less than 5
```is.android()
------------
#### Checks if current device has Android.
interface: not```javascript
is.android();
=> true if current device has Android OSis.not.android();
=> true if current device has not Android OS
```is.androidPhone()
-----------------
#### Checks if current device is Android phone.
interface: not```javascript
is.androidPhone();
=> true if current device is Android phoneis.not.androidPhone();
=> true if current device is not Android phone
```is.androidTablet()
------------------
#### Checks if current device is Android tablet.
interface: not```javascript
is.androidTablet();
=> true if current device is Android tabletis.not.androidTablet();
=> true if current device is not Android tablet
```is.blackberry()
---------------
#### Checks if current device is Blackberry.
interface: not```javascript
is.blackberry();
=> true if current device is Blackberryis.not.blackberry();
=> true if current device is not Blackberry
```is.windowsPhone()
-----------------
#### Checks if current device is Windows phone.
interface: not```javascript
is.windowsPhone();
=> true if current device is Windows phoneis.not.windowsPhone();
=> true if current device is not Windows Phone
```is.windowsTablet()
------------------
#### Checks if current device is Windows tablet.
interface: not```javascript
is.windowsTablet();
=> true if current device is Windows tabletis.not.windowsTablet();
=> true if current device is not Windows tablet
```is.windows()
------------
#### Checks if current OS is Windows.
interface: not```javascript
is.windows();
=> true if current OS is Windowsis.not.windows();
=> true if current OS is not Windows
```is.mac()
--------
#### Checks if current OS is Mac OS X.
interface: not```javascript
is.mac();
=> true if current OS is Mac OS Xis.not.mac();
=> true if current OS is not Mac OS X
```is.linux()
----------
#### Checks if current OS is linux.
interface: not```javascript
is.linux();
=> true if current OS is linuxis.not.linux();
=> true if current OS is not linux
```is.desktop()
------------
#### Checks if current device is desktop.
interface: not```javascript
is.desktop();
=> true if current device is desktopis.not.desktop();
=> true if current device is not desktop
```is.mobile()
-----------
#### Checks if current device is mobile.
interface: not
iPhone, iPod, Android Phone, Windows Phone, Blackberry.
```javascriptis.mobile();
=> true if current device is mobileis.not.mobile();
=> true if current device is not mobile
```is.tablet()
-----------
#### Checks if current device is tablet.
interface: not
iPad, Android Tablet, Windows Tablet
```javascriptis.tablet();
=> true if current device is tabletis.not.tablet();
=> true if current device is not tablet
```is.online()
-----------
#### Checks if current device is online.
interface: not```javascript
is.online();
=> true if current device is onlineis.not.online();
=> true if current device is not online
```is.offline()
------------
#### Checks if current device is offline.
interface: not```javascript
is.offline();
=> true if current device is offlineis.not.offline();
=> true if current device is not offline
```is.touchDevice()
------------
#### Checks if current device supports touch.
interface: not```javascript
is.touchDevice();
=> true if current device supports touchis.not.touchDevice();
=> true if current device does not support touch
```Time checks
===========is.today(value:date)
----------------------
#### Checks if the given date object indicate today.
interfaces: not, all, any```javascript
var today = new Date();
is.today(today);
=> truevar yesterday = new Date(new Date().setDate(new Date().getDate() - 1));
is.today(yesterday);
=> falseis.not.today(yesterday);
=> trueis.all.today(today, today);
=> trueis.any.today(today, yesterday);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.today([today, yesterday]);
=> false
```is.yesterday(value:date)
--------------------------
#### Checks if the given date object indicate yesterday.
interfaces: not, all, any```javascript
var today = new Date();
is.yesterday(today);
=> falsevar yesterday = new Date(new Date().setDate(new Date().getDate() - 1));
is.yesterday(yesterday);
=> trueis.not.yesterday(today);
=> trueis.all.yesterday(yesterday, today);
=> falseis.any.yesterday(today, yesterday);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.yesterday([today, yesterday]);
=> false
```is.tomorrow(value:date)
-------------------------
#### Checks if the given date object indicate tomorrow.
interfaces: not, all, any```javascript
var today = new Date();
is.tomorrow(today);
=> falsevar tomorrow = new Date(new Date().setDate(new Date().getDate() + 1));
is.tomorrow(tomorrow);
=> trueis.not.tomorrow(today);
=> trueis.all.tomorrow(tomorrow, today);
=> falseis.any.tomorrow(today, tomorrow);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.tomorrow([today, tomorrow]);
=> false
```is.past(value:date)
---------------------
#### Checks if the given date object indicate past.
interfaces: not, all, any```javascript
var yesterday = new Date(new Date().setDate(new Date().getDate() - 1));
var tomorrow = new Date(new Date().setDate(new Date().getDate() + 1));is.past(yesterday);
=> trueis.past(tomorrow);
=> falseis.not.past(tomorrow);
=> trueis.all.past(tomorrow, yesterday);
=> falseis.any.past(yesterday, tomorrow);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.past([yesterday, tomorrow]);
=> false
```is.future(value: date)
-----------------------
#### Checks if the given date object indicate future.
interfaces: not, all, any```javascript
var yesterday = new Date(new Date().setDate(new Date().getDate() - 1));
var tomorrow = new Date(new Date().setDate(new Date().getDate() + 1));is.future(yesterday);
=> falseis.future(tomorrow);
=> trueis.not.future(yesterday);
=> trueis.all.future(tomorrow, yesterday);
=> falseis.any.future(yesterday, tomorrow);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.future([yesterday, tomorrow]);
=> false
```is.day(value:date, day:string)
-------------------------------
#### Checks if the given date objects' day equal given dayString parameter.
interface: not```javascript
var mondayObj = new Date('01/26/2015');
var tuesdayObj = new Date('01/27/2015');
is.day(mondayObj, 'monday');
=> trueis.day(mondayObj, 'tuesday');
=> falseis.not.day(mondayObj, 'tuesday');
=> true
```is.month(value:date, month:string)
-----------------------------------
#### Checks if the given date objects' month equal given monthString parameter.
interface: not```javascript
var januaryObj = new Date('01/26/2015');
var februaryObj = new Date('02/26/2015');
is.month(januaryObj, 'january');
=> trueis.month(februaryObj, 'january');
=> falseis.not.month(februaryObj, 'january');
=> true
```is.year(value:date, year:number)
---------------------------------
#### Checks if the given date objects' year equal given yearNumber parameter.
interface: not```javascript
var year2015 = new Date('01/26/2015');
var year2016 = new Date('01/26/2016');
is.year(year2015, 2015);
=> trueis.year(year2016, 2015);
=> falseis.not.year(year2016, 2015);
=> true
```is.leapYear(value:number)
---------------------------------
#### Checks if the given year number is a leap year
interfaces: not, all, any```javascript
is.leapYear(2016);
=> trueis.leapYear(2015);
=> falseis.not.leapYear(2015);
=> trueis.all.leapYear(2015, 2016);
=> falseis.any.leapYear(2015, 2016);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.leapYear([2016, 2080]);
=> true
```is.weekend(value:date)
------------------------
#### Checks if the given date objects' day is weekend.
interfaces: not, all, any```javascript
var monday = new Date('01/26/2015');
var sunday = new Date('01/25/2015');
var saturday = new Date('01/24/2015');
is.weekend(sunday);
=> trueis.weekend(monday);
=> falseis.not.weekend(monday);
=> trueis.all.weekend(sunday, saturday);
=> trueis.any.weekend(sunday, saturday, monday);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.weekend([sunday, saturday, monday]);
=> false
```is.weekday(value:date)
------------------------
#### Checks if the given date objects' day is weekday.
interfaces: not, all, any```javascript
var monday = new Date('01/26/2015');
var sunday = new Date('01/25/2015');
var saturday = new Date('01/24/2015');
is.weekday(monday);
=> trueis.weekday(sunday);
=> falseis.not.weekday(sunday);
=> trueis.all.weekday(monday, saturday);
=> falseis.any.weekday(sunday, saturday, monday);
=> true// 'all' and 'any' interfaces can also take array parameter
is.all.weekday([sunday, saturday, monday]);
=> false
```is.inDateRange(value:date, start:date, end:date)
----------------------------------------------------
#### Checks if date is within given range.
interface: not```javascript
var saturday = new Date('01/24/2015');
var sunday = new Date('01/25/2015');
var monday = new Date('01/26/2015');
is.inDateRange(sunday, saturday, monday);
=> trueis.inDateRange(saturday, sunday, monday);
=> falseis.not.inDateRange(saturday, sunday, monday);
=> true
```is.inLastWeek(value:date)
---------------------------
#### Checks if the given date is between now and 7 days ago.
interface: not```javascript
var twoDaysAgo = new Date(new Date().setDate(new Date().getDate() - 2));
var nineDaysAgo = new Date(new Date().setDate(new Date().getDate() - 9));
is.inLastWeek(twoDaysAgo);
=> trueis.inLastWeek(nineDaysAgo);
=> falseis.not.inLastWeek(nineDaysAgo);
=> true
```is.inLastMonth(value:date)
----------------------------
#### Checks if the given date is between now and a month ago.
interface: not```javascript
var tenDaysAgo = new Date(new Date().setDate(new Date().getDate() - 10));
var fortyDaysAgo = new Date(new Date().setDate(new Date().getDate() - 40));
is.inLastMonth(tenDaysAgo);
=> trueis.inLastMonth(fortyDaysAgo);
=> falseis.not.inLastMonth(fortyDaysAgo);
=> true
```is.inLastYear(value:date)
---------------------------
#### Checks if the given date is between now and a year ago.
interface: not```javascript
var twoMonthsAgo = new Date(new Date().setMonth(new Date().getMonth() - 2));
var thirteenMonthsAgo = new Date(new Date().setMonth(new Date().getMonth() - 13));
is.inLastYear(twoMonthsAgo);
=> trueis.inLastYear(thirteenMonthsAgo);
=> falseis.not.inLastYear(thirteenMonthsAgo);
=> true
```is.inNextWeek(value:date)
---------------------------
#### Checks if the given date is between now and 7 days later.
interface: not```javascript
var twoDaysLater = new Date(new Date().setDate(new Date().getDate() + 2));
var nineDaysLater = new Date(new Date().setDate(new Date().getDate() + 9));
is.inNextWeek(twoDaysLater);
=> trueis.inNextWeek(nineDaysLater);
=> falseis.not.inNextWeek(nineDaysLater);
=> true
```is.inNextMonth(value:date)
----------------------------
#### Checks if the given date is between now and a month later.
interface: not```javascript
var tenDaysLater = new Date(new Date().setDate(new Date().getDate() + 10));
var fortyDaysLater = new Date(new Date().setDate(new Date().getDate() + 40));
is.inNextMonth(tenDaysLater);
=> trueis.inNextMonth(fortyDaysLater);
=> falseis.not.inNextMonth(fortyDaysLater);
=> true
```is.inNextYear(value:date)
---------------------------
#### Checks if the given date is between now and a year later.
interface: not```javascript
var twoMonthsLater = new Date(new Date().setMonth(new Date().getMonth() + 2));
var thirteenMonthsLater = new Date(new Date().setMonth(new Date().getMonth() + 13));
is.inNextYear(twoMonthsLater);
=> trueis.inNextYear(thirteenMonthsLater);
=> falseis.not.inNextYear(thirteenMonthsLater);
=> true
```is.quarterOfYear(value:date, quarter:number)
---------------------------------------------
#### Checks if the given date is in the parameter quarter.
interface: not```javascript
var firstQuarter = new Date('01/26/2015');
var secondQuarter = new Date('05/26/2015');
is.quarterOfYear(firstQuarter, 1);
=> trueis.quarterOfYear(secondQuarter, 1);
=> falseis.not.quarterOfYear(secondQuarter, 1);
=> true
```is.dayLightSavingTime(value:date)
--------------------------------------------------
#### Checks if the given date is in daylight saving time.
interface: not```javascript
// For Turkey Time Zone
var january1 = new Date('01/01/2015');
var june1 = new Date('06/01/2015');is.dayLightSavingTime(june1);
=> trueis.dayLightSavingTime(january1);
=> falseis.not.dayLightSavingTime(january1);
=> true
```Configuration methods
=====================is.setRegexp(value:regexp, name:string)
----------------------------------------
Override RegExps if you think they suck.```javascript
is.url('https://www.duckduckgo.com');
=> trueis.setRegexp(/quack/, 'url');
is.url('quack');
=> true
```Actual checks
=============is.cnBankCard(value: any)
---------------------------
#### Checks if the given card number is cnBankCard.
interface: not```javascript
is.cnBankCard('6214837838319709');
=> trueis.cnBankCard('123456');
=> false
```is.cnCellNum(value: any)
---------------------------
#### Checks if the given cell number is cnCellNum.
interface: not```javascript
is.cnCellNum('13984896107');
=> trueis.cnCellNum('123456');
=> false
```is.cnIdCode(value: any)
---------------------------
#### Checks if the given id code is cnIdCode.
interface: not```javascript
is.cnIdCode('130421197502013675');
=> trueis.cnIdCode('123456');
=> false
```is.cnName(value: any)
---------------------------
#### Checks if the given name is cnName.
interface: not```javascript
is.cnName('马云');
=> trueis.cnName('123456');
=> false
```is.cnTelNum(value: any)
---------------------------
#### Checks if the given tel number is cnTelNum.
interface: not```javascript
is.cnTelNum('010-1234567');
=> trueis.cnTelNum('123456');
=> false
```is.cnZipCode(value: any)
---------------------------
#### Checks if the given tel number is cnZipCode.
interface: not```javascript
is.cnZipCode('100000');
=> trueis.cnZipCode('1222');
=> false
```is.password(value: any)
---------------------------
#### Checks if the given value is password.
interface: not```javascript
is.password('abcd1234567890');
=> trueis.password('1222');
=> false
```is.username(value: any)
---------------------------
#### Checks if the given value is username.
interface: not```javascript
is.username('username123123');
=> trueis.username('1222');
=> false
```is.QQ(value: any)
---------------------------
#### Checks if the given value is QQ.
interface: not```javascript
is.QQ('12345678');
=> trueis.QQ('lol!');
=> false
```