[
  {
    "path": ".editorconfig",
    "content": "# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.\n# See http://editorconfig.org for details.\n\n# This is the top-most .editorconfig file; do not search in parent directories.\nroot = true\n\n# All files.\n[*]\nindent_style = space\nindent_size = 4\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n# Markdown.\n[*.md]\ntrim_trailing_whitespace = false\nindent_style = space\nindent_size = 2\n\n# Configuration.\n[*.{json,yml}]\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": ".eslintignore",
    "content": "is.min.js\n"
  },
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n    extends: 'eslint:recommended',\n    env: {\n        browser: true,\n        node: true,\n        amd: true\n    },\n    globals: {\n        DocumentTouch: false\n    },\n    rules: {\n        indent: ['error', 4]\n    }\n};\n"
  },
  {
    "path": ".gitattributes",
    "content": "* text=auto\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\n*.log\nbower_components\nnode_modules\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nsudo: false\nnode_js:\n  - \"4\"\n  - \"6\"\ncache:\n  directories:\n    - $HOME/.npm\ngit:\n  depth: 10\nbranches:\n  only:\n    - master\nbefore_install:\n  - \"nvm use $TRAVIS_NODE_VERSION\"\n  - \"npm set loglevel error\"\n  - \"npm set progress false\"\n  - \"npm i -g npm@\\\"^2.0.0\\\"\"\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to is.js\n\n## General Guidelines\n\nThanks for considering to contribute is.js\n\n- Please don’t re-build minified library on your pull request.\n- Be sure you’ve added tests if you are sending a new feature.\n- I’ll take care of the documentation and github page.\n\nCheers.\n\n## Feature Requests\n\nFeature requests should be submitted in the\n[issue tracker](https://github.com/arasatasaygin/is.js/issues), with a description of\nthe expected behavior & use case, where they’ll remain closed until sufficient interest,\n[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),\nhas been [shown by the community](https://github.com/arasatasaygin/is.js/issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc).\nBefore submitting a request, please search for similar ones in the\n[closed issues](https://github.com/arasatasaygin/is.js/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2014-2016 Aras Atasaygin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "is.js\n=====\n\n[![JS.ORG](https://img.shields.io/badge/js.org-is-ffb400.svg?style=flat-square)](http://js.org)\n\n#### This is a general-purpose check library.\n- No dependencies\n- AMD, Node & browser ready\n\n#### Usage:\n\nNode.js:\n```\nnpm install is_js\n```\n\nBower:\n```\nbower install is_js\n```\n\nBuild:\n```\nnpm run build\n```\n\nTest:\n```\nnpm test\n```\n\n#### Contributing:\nThanks for considering to contribute. Check [here](CONTRIBUTING.md)\n\n#### Contributors:\nMany thanks to our contributors: https://github.com/arasatasaygin/is.js/graphs/contributors\n\nType checks\n===========\n\nis.arguments(value:any)\n-----------------------\n#### Checks if the given value type is arguments.\ninterfaces: not, all, any\n\n```javascript\nvar getArguments = function() {\n    return arguments;\n};\nvar arguments = getArguments();\n\nis.arguments(arguments);\n=> true\n\nis.not.arguments({foo: 'bar'});\n=> true\n\nis.all.arguments(arguments, 'bar');\n=> false\n\nis.any.arguments(['foo'], arguments);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.arguments([arguments, 'foo', 'bar']);\n=> false\n```\n\nis.array(value:any)\n-------------------\n#### Checks if the given value type is array.\ninterfaces: not, all, any\n\n```javascript\nis.array(['foo', 'bar', 'baz']);\n=> true\n\nis.not.array({foo: 'bar'});\n=> true\n\nis.all.array(['foo'], 'bar');\n=> false\n\nis.any.array(['foo'], 'bar');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.array([[1, 2], 'foo', 'bar']);\n=> false\n```\n\nis.boolean(value:any)\n---------------------\n#### Checks if the given value type is boolean.\ninterfaces: not, all, any\n\n```javascript\nis.boolean(true);\n=> true\n\nis.not.boolean({foo: 'bar'});\n=> true\n\nis.all.boolean(true, 'bar');\n=> false\n\nis.any.boolean(true, 'bar');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.boolean([true, 'foo', 'bar']);\n=> false\n```\n\nis.date(value:any)\n------------------\n#### Checks if the given value type is date.\ninterfaces: not, all, any\n\n```javascript\nis.date(new Date());\n=> true\n\nis.not.date({foo: 'bar'});\n=> true\n\nis.all.date(new Date(), 'bar');\n=> false\n\nis.any.date(new Date(), 'bar');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.date([new Date(), 'foo', 'bar']);\n=> false\n```\n\nis.domNode(value:any)\n-----------------------------\n#### Checks if the given object is a dom node.\ninterfaces: not, all, any\n\n```javascript\nvar obj = document.createElement('div');\nis.domNode(obj);\n=> true\n\nis.domNode({nope: 'nope'});\n=> false\n\nis.not.domNode({});\n=> true\n\nis.all.domNode(obj, obj);\n=> true\n\nis.any.domNode(obj, {nope: 'nope'});\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.domNode([obj, {nope: 'nope'}]);\n=> false\n```\n\nis.error(value:any)\n-------------------\n#### Checks if the given value type is error.\ninterfaces: not, all, any\n\n```javascript\nis.error(new Error());\n=> true\n\nis.not.error({foo: 'bar'});\n=> true\n\nis.all.error(new Error(), 'bar');\n=> false\n\nis.any.error(new Error(), 'bar');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.error([new Error(), 'foo', 'bar']);\n=> false\n```\n\nis.function(value:any)\n----------------------\n#### Checks if the given value type is function.\ninterfaces: not, all, any\n\n```javascript\nis.function(toString);\n=> true\n\nis.not.function({foo: 'bar'});\n=> true\n\nis.all.function(toString, 'bar');\n=> false\n\nis.any.function(toString, 'bar');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.function([toString, 'foo', 'bar']);\n=> false\n```\n\nis.nan(value:any)\n-----------------\n#### Checks if the given value type is NaN.\ninterfaces: not, all, any\n\n```javascript\nis.nan(NaN);\n=> true\n\nis.not.nan(42);\n=> true\n\nis.all.nan(NaN, 1);\n=> false\n\nis.any.nan(NaN, 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.nan([NaN, 'foo', 1]);\n=> false\n```\n\nis.null(value:any)\n------------------\n#### Checks if the given value type is null.\ninterfaces: not, all, any\n\n```javascript\nis.null(null);\n=> true\n\nis.not.null(42);\n=> true\n\nis.all.null(null, 1);\n=> false\n\nis.any.null(null, 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.null([null, 'foo', 1]);\n=> false\n```\n\nis.number(value:any)\n--------------------\n#### Checks if the given value type is number.\ninterfaces: not, all, any\n\n```javascript\nis.number(42);\n=> true\n\nis.number(NaN);\n=> false\n\nis.not.number('42');\n=> true\n\nis.all.number('foo', 1);\n=> false\n\nis.any.number({}, 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.number([42, 'foo', 1]);\n=> false\n```\n\nis.object(value:any)\n--------------------\n#### Checks if the given value type is object.\ninterfaces: not, all, any\n\n```javascript\nis.object({foo: 'bar'});\n=> true\n\n// functions are also returning as true\nis.object(toString);\n=> true\n\nis.not.object('foo');\n=> true\n\nis.all.object({}, 1);\n=> false\n\nis.any.object({}, 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.object([{}, new Object()]);\n=> true\n```\n\nis.json(value:any)\n--------------------\n#### Checks if the given value type is pure json object.\ninterfaces: not, all, any\n\n```javascript\nis.json({foo: 'bar'});\n=> true\n\n// functions are returning as false\nis.json(toString);\n=> false\n\nis.not.json([]);\n=> true\n\nis.all.json({}, 1);\n=> false\n\nis.any.json({}, 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.json([{}, {foo: 'bar'}]);\n=> true\n```\n\nis.regexp(value:any)\n--------------------\n#### Checks if the given value type is RegExp.\ninterfaces: not, all, any\n\n```javascript\nis.regexp(/test/);\n=> true\n\nis.not.regexp(['foo']);\n=> true\n\nis.all.regexp(/test/, 1);\n=> false\n\nis.any.regexp(new RegExp('ab+c'), 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.regexp([{}, /test/]);\n=> false\n```\n\nis.string(value:any)\n--------------------\n#### Checks if the given value type is string.\ninterfaces: not, all, any\n\n```javascript\nis.string('foo');\n=> true\n\nis.not.string(['foo']);\n=> true\n\nis.all.string('foo', 1);\n=> false\n\nis.any.string('foo', 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.string([{}, 'foo']);\n=> false\n```\n\nis.char(value:any)\n--------------------\n#### Checks if the given value type is char.\ninterfaces: not, all, any\n\n```javascript\nis.char('f');\n=> true\n\nis.not.char(['foo']);\n=> true\n\nis.all.char('f', 1);\n=> false\n\nis.any.char('f', 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.char(['f', 'o', 'o']);\n=> true\n```\n\nis.undefined(value:any)\n-----------------------\n#### Checks if the given value type is undefined.\ninterfaces: not, all, any\n\n```javascript\nis.undefined(undefined);\n=> true\n\nis.not.undefined(null);\n=> true\n\nis.all.undefined(undefined, 1);\n=> false\n\nis.any.undefined(undefined, 2);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.undefined([{}, undefined]);\n=> false\n```\n\nis.sameType(value:any, other:any)\n---------------------------------\n#### Checks if the given value types are same type.\ninterface: not\n\n```javascript\nis.sameType(42, 7);\n=> true\n\nis.sameType(42, '7');\n=> false\n\nis.not.sameType(42, 7);\n=> false\n```\n\nis.windowObject(value:any)\n-----------------------------\n#### Checks if the given object is window object.\ninterfaces: not, all, any\n\n```javascript\nis.windowObject(window);\n=> true\n\nis.windowObject({nope: 'nope'});\n=> false\n\nis.not.windowObject({});\n=> true\n\nis.all.windowObject(window, {nope: 'nope'});\n=> false\n\nis.any.windowObject(window, {nope: 'nope'});\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.windowObject([window, {nope: 'nope'}]);\n=> false\n```\n\nPresence checks\n===============\n\nis.empty(value:array|object|string)\n-----------------------------------\n#### Checks if the given value is empty.\ninterfaces: not, all, any\n\n```javascript\nis.empty({});\n=> true\n\nis.empty([]);\n=> true\n\nis.empty('');\n=> true\n\nis.not.empty(['foo']);\n=> true\n\nis.all.empty('', {}, ['foo']);\n=> false\n\nis.any.empty([], 42);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.empty([{}, 'foo']);\n=> false\n```\n\nis.existy(value:any)\n--------------------\n#### Checks if the given value is existy. (not null or undefined)\ninterfaces: not, all, any\n\n```javascript\nis.existy({});\n=> true\n\nis.existy(null);\n=> false\n\nis.not.existy(undefined);\n=> true\n\nis.all.existy(null, ['foo']);\n=> false\n\nis.any.existy(undefined, 42);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.existy([{}, 'foo']);\n=> true\n```\n\nis.truthy(value:any)\n--------------------\n#### Checks if the given value is truthy. (existy and not false)\ninterfaces: not, all, any\n\n```javascript\nis.truthy(true);\n=> true\n\nis.truthy(null);\n=> false\n\nis.not.truthy(false);\n=> true\n\nis.all.truthy(null, true);\n=> false\n\nis.any.truthy(undefined, true);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.truthy([{}, true]);\n=> true\n```\n\nis.falsy(value:any)\n-------------------\n#### Checks if the given value is falsy.\ninterfaces: not, all, any\n\n```javascript\nis.falsy(false);\n=> true\n\nis.falsy(null);\n=> true\n\nis.not.falsy(true);\n=> true\n\nis.all.falsy(null, false);\n=> true\n\nis.any.falsy(undefined, true);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.falsy([false, true, undefined]);\n=> false\n```\n\nis.space(value:any)\n----------------------\n#### Checks if the given value is space.\ninterfaces: not, all, any\n\n```javascript\nis.space(' ');\n=> true\n\nis.space('foo');\n=> false\n\nis.not.space(true);\n=> true\n\nis.all.space(' ', 'foo');\n=> false\n\nis.any.space(' ', true);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.space([' ', 'foo', undefined]);\n=> false\n```\n\nRegExp checks\n=============\n\nis.url(value:any)\n-----------------\n#### Checks if the given value matches url regexp.\ninterfaces: not, all, any\n\n```javascript\nis.url('http://www.test.com');\n=> true\n\nis.url('foo');\n=> false\n\nis.not.url(true);\n=> true\n\nis.all.url('http://www.test.com', 'foo');\n=> false\n\nis.any.url('http://www.test.com', true);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.url(['http://www.test.com', 'foo', undefined]);\n=> false\n```\n\nis.email(value:any)\n-------------------\n#### Checks if the given value matches email regexp.\ninterfaces: not, all, any\n\n```javascript\nis.email('test@test.com');\n=> true\n\nis.email('foo');\n=> false\n\nis.not.email('foo');\n=> true\n\nis.all.email('test@test.com', 'foo');\n=> false\n\nis.any.email('test@test.com', 'foo');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.email(['test@test.com', 'foo', undefined]);\n=> false\n```\n\nis.creditCard(value:any)\n------------------------\n#### Checks if the given value matches credit card regexp.\ninterfaces: not, all, any\n\n```javascript\nis.creditCard(378282246310005);\n=> true\n\nis.creditCard(123);\n=> false\n\nis.not.creditCard(123);\n=> true\n\nis.all.creditCard(378282246310005, 123);\n=> false\n\nis.any.creditCard(378282246310005, 123);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.creditCard([378282246310005, 123, undefined]);\n=> false\n```\n\nis.alphaNumeric(value:any)\n--------------------------\n#### Checks if the given value matches alpha numeric regexp.\ninterfaces: not, all, any\n\n```javascript\nis.alphaNumeric('alphaNu3er1k');\n=> true\n\nis.alphaNumeric('*?');\n=> false\n\nis.not.alphaNumeric('*?');\n=> true\n\nis.all.alphaNumeric('alphaNu3er1k', '*?');\n=> false\n\nis.any.alphaNumeric('alphaNu3er1k', '*?');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.alphaNumeric(['alphaNu3er1k', '*?']);\n=> false\n```\n\nis.timeString(value:any)\n------------------------\n#### Checks if the given value matches time string regexp.\ninterfaces: not, all, any\n\n```javascript\nis.timeString('13:45:30');\n=> true\n\nis.timeString('90:90:90');\n=> false\n\nis.not.timeString('90:90:90');\n=> true\n\nis.all.timeString('13:45:30', '90:90:90');\n=> false\n\nis.any.timeString('13:45:30', '90:90:90');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.timeString(['13:45:30', '90:90:90']);\n=> false\n```\n\nis.dateString(value:any)\n------------------------\n#### Checks if the given value matches date string regexp.\ninterfaces: not, all, any\n\n```javascript\nis.dateString('11/11/2011');\n=> true\n\nis.dateString('10-21-2012');\n=> true\n\nis.dateString('90/11/2011');\n=> false\n\nis.not.dateString('90/11/2011');\n=> true\n\nis.all.dateString('11/11/2011', '90/11/2011');\n=> false\n\nis.any.dateString('11-11-2011', '90/11/2011');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.dateString(['11/11/2011', '90/11/2011']);\n=> false\n```\n\nis.usZipCode(value:any)\n-----------------------\n#### Checks if the given value matches US zip code regexp.\ninterfaces: not, all, any\n\n```javascript\nis.usZipCode('02201-1020');\n=> true\n\nis.usZipCode('123');\n=> false\n\nis.not.usZipCode('123');\n=> true\n\nis.all.usZipCode('02201-1020', '123');\n=> false\n\nis.any.usZipCode('02201-1020', '123');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.usZipCode(['02201-1020', '123']);\n=> false\n```\n\nis.caPostalCode(value:any)\n--------------------------\n#### Checks if the given value matches Canada postal code regexp.\ninterfaces: not, all, any\n\n```javascript\nis.caPostalCode('L8V3Y1');\n=> true\n\nis.caPostalCode('L8V 3Y1');\n=> true\n\nis.caPostalCode('123');\n=> false\n\nis.not.caPostalCode('123');\n=> true\n\nis.all.caPostalCode('L8V3Y1', '123');\n=> false\n\nis.any.caPostalCode('L8V3Y1', '123');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.caPostalCode(['L8V3Y1', '123']);\n=> false\n```\n\nis.ukPostCode(value:any)\n------------------------\n#### Checks if the given value matches UK post code regexp.\ninterfaces: not, all, any\n\n```javascript\nis.ukPostCode('B184BJ');\n=> true\n\nis.ukPostCode('123');\n=> false\n\nis.not.ukPostCode('123');\n=> true\n\nis.all.ukPostCode('B184BJ', '123');\n=> false\n\nis.any.ukPostCode('B184BJ', '123');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.ukPostCode(['B184BJ', '123']);\n=> false\n```\n\nis.nanpPhone(value:any)\n-----------------------\n#### Checks if the given value matches North American numbering plan phone regexp.\ninterfaces: not, all, any\n\n```javascript\nis.nanpPhone('609-555-0175');\n=> true\n\nis.nanpPhone('123');\n=> false\n\nis.not.nanpPhone('123');\n=> true\n\nis.all.nanpPhone('609-555-0175', '123');\n=> false\n\nis.any.nanpPhone('609-555-0175', '123');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.nanpPhone(['609-555-0175', '123']);\n=> false\n```\n\nis.eppPhone(value:any)\n----------------------\n#### Checks if the given value matches extensible provisioning protocol phone regexp.\ninterfaces: not, all, any\n\n```javascript\nis.eppPhone('+90.2322456789');\n=> true\n\nis.eppPhone('123');\n=> false\n\nis.not.eppPhone('123');\n=> true\n\nis.all.eppPhone('+90.2322456789', '123');\n=> false\n\nis.any.eppPhone('+90.2322456789', '123');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.eppPhone(['+90.2322456789', '123']);\n=> false\n```\n\nis.socialSecurityNumber(value:any)\n----------------------------------\n#### Checks if the given value matches social security number regexp.\ninterfaces: not, all, any\n\n```javascript\nis.socialSecurityNumber('017-90-7890');\n=> true\n\nis.socialSecurityNumber('017907890');\n=> true\n\nis.socialSecurityNumber('123');\n=> false\n\nis.not.socialSecurityNumber('123');\n=> true\n\nis.all.socialSecurityNumber('017-90-7890', '123');\n=> false\n\nis.any.socialSecurityNumber('017907890', '123');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.socialSecurityNumber(['017-90-7890', '123']);\n=> false\n```\n\nis.affirmative(value:any)\n-------------------------\n#### Checks if the given value matches affirmative regexp.\ninterfaces: not, all, any\n\n```javascript\nis.affirmative('yes');\n=> true\n\nis.affirmative('no');\n=> false\n\nis.not.affirmative('no');\n=> true\n\nis.all.affirmative('yes', 'no');\n=> false\n\nis.any.affirmative('yes', 'no');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.affirmative(['yes', 'y', 'true', 't', 'ok', 'okay']);\n=> true\n```\n\nis.hexadecimal(value:any)\n-------------------------\n#### Checks if the given value matches hexadecimal regexp.\ninterfaces: not, all, any\n\n```javascript\nis.hexadecimal('f0f0f0');\n=> true\n\nis.hexadecimal('0xf0f0f0');\n=> true\n\nis.hexadecimal(2.5);\n=> false\n\nis.not.hexadecimal('string');\n=> true\n\nis.all.hexadecimal('ff', 'f50');\n=> true\n\nis.any.hexadecimal('0xff5500', true);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.hexadecimal(['fff', '333', 'f50']);\n=> true\n```\n\nis.hexColor(value:any)\n-------------------------\n#### Checks if the given value matches hexcolor regexp.\ninterfaces: not, all, any\n\n```javascript\nis.hexColor('#333');\n=> true\n\nis.hexColor('#3333');\n=> false\n\nis.not.hexColor(0.5);\n=> true\n\nis.all.hexColor('fff', 'f50');\n=> true\n\nis.any.hexColor('ff5500', 0.5);\n=> false\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.hexColor(['fff', '333', 'f50']);\n=> true\n```\n\nis.ip(value:any)\n-------------------------\n#### Checks if the given value matches ip regexp\ninterfaces: not, all, any\n\n```javascript\nis.ip('198.156.23.5');\n=> true\n\nis.ip('1.2..5');\n=> false\n\nis.not.ip('8:::::::7');\n=> true\n\nis.all.ip('0:1::4:ff5:54:987:C', '123.123.123.123');\n=> true\n\nis.any.ip('123.8.4.3', '0.0.0.0');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.ip(['123.123.23.12', 'A:B:C:D:E:F:0:0']);\n=> true\n```\n\nis.ipv4(value:any)\n-------------------------\n#### Checks if the given value matches ipv4 regexp\ninterfaces: not, all, any\n\n```javascript\nis.ipv4('198.12.3.142');\n=> true\n\nis.ipv4('1.2..5');\n=> false\n\nis.not.ipv4('8:::::::7');\n=> true\n\nis.all.ipv4('198.12.3.142', '123.123.123.123');\n=> true\n\nis.any.ipv4('255.255.255.255', '850..1.4');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.ipv4(['198.12.3.142', '1.2.3']);\n=> false\n\n```\n\nis.ipv6(value:any)\n-------------------------\n#### Checks if the given value matches ipv6 regexp\ninterfaces: not, all, any\n\n```javascript\nis.ipv6('2001:DB8:0:0:1::1');\n=> true\n\nis.ipv6('985.12.3.4');\n=> true\n\nis.not.ipv6('8:::::::7');\n=> true\n\nis.all.ipv6('2001:DB8:0:0:1::1', '1:50:198:2::1:2:8');\n=> true\n\nis.any.ipv6('255.255.255.255', '2001:DB8:0:0:1::1');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.ipv6(['2001:DB8:0:0:1::1', '1.2.3']);\n=> false\n```\n\nString checks\n=============\n\nis.include(value:string, target:string)\n-----------------------------------------\n#### Checks if the given string contains a substring.\ninterface: not\n\n```javascript\nis.include('Some text goes here', 'text');\n=> true\n\nis.include('test', 'text');\n=> false\n\nis.not.include('test', 'text');\n=> true\n```\n\nis.upperCase(value:string)\n--------------------------\n#### Checks if the given string is UPPERCASE.\ninterfaces: not, all, any\n\n```javascript\nis.upperCase('YEAP');\n=> true\n\nis.upperCase('nope');\n=> false\n\nis.not.upperCase('Nope');\n=> true\n\nis.all.upperCase('YEAP', 'nope');\n=> false\n\nis.any.upperCase('YEAP', 'nope');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.upperCase(['YEAP', 'ALL UPPERCASE']);\n=> true\n```\n\n\nis.lowerCase(value:string)\n--------------------------\n#### Checks if the given string is lowercase.\ninterfaces: not, all, any\n\n```javascript\nis.lowerCase('yeap');\n=> true\n\nis.lowerCase('NOPE');\n=> false\n\nis.not.lowerCase('Nope');\n=> true\n\nis.all.lowerCase('yeap', 'NOPE');\n=> false\n\nis.any.lowerCase('yeap', 'NOPE');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.lowerCase(['yeap', 'all lowercase']);\n=> true\n```\n\nis.startWith(value:string, target:string)\n-------------------------------------------\n#### Checks if the given string starts with substring.\ninterface: not\n\n```javascript\nis.startWith('yeap', 'ye');\n=> true\n\nis.startWith('nope', 'ye');\n=> false\n\nis.not.startWith('nope not that', 'not');\n=> true\n```\n\nis.endWith(value:string, target:string)\n-----------------------------------------\n#### Checks if the given string ends with substring.\ninterfaces: not\n\n```javascript\nis.endWith('yeap', 'ap');\n=> true\n\nis.endWith('nope', 'no');\n=> false\n\nis.not.endWith('nope not that', 'not');\n=> true\n\nis.endWith('yeap that one', 'one');\n=> true\n```\n\nis.capitalized(value:string)\n---------------------------------------------\n#### Checks if the given string is capitalized.\ninterfaces: not, all, any\n\n```javascript\nis.capitalized('Yeap');\n=> true\n\nis.capitalized('nope');\n=> false\n\nis.not.capitalized('nope not capitalized');\n=> true\n\nis.not.capitalized('nope Capitalized');\n=> true\n\nis.all.capitalized('Yeap', 'All', 'Capitalized');\n=> true\n\nis.any.capitalized('Yeap', 'some', 'Capitalized');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.capitalized(['Nope', 'not']);\n=> false\n```\n\nis.palindrome(value:string)\n---------------------------------------------\n#### Checks if the given string is palindrome.\ninterfaces: not, all, any\n\n```javascript\nis.palindrome('testset');\n=> true\n\nis.palindrome('A man, a plan, a canal - Panama!');\n=> true\n\nis.palindrome('nope');\n=> false\n\nis.not.palindrome('nope not palindrome');\n=> true\n\nis.not.palindrome('tt');\n=> false\n\nis.all.palindrome('testset', 'tt');\n=> true\n\nis.any.palindrome('Yeap', 'some', 'testset');\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.palindrome(['Nope', 'testset']);\n=> false\n```\n\nArithmetic checks\n=================\n\nis.equal(value:any, other:any)\n------------------------------\n#### Checks if the given values are equal.\ninterfaces: not\n\n```javascript\nis.equal(42, 40 + 2);\n=> true\n\nis.equal('yeap', 'yeap');\n=> true\n\nis.equal(true, true);\n=> true\n\nis.not.equal('yeap', 'nope');\n=> true\n```\n\nis.even(value:number)\n---------------------\n#### Checks if the given value is even.\ninterfaces: not, all, any\n\n```javascript\nis.even(42);\n=> true\n\nis.not.even(41);\n=> true\n\nis.all.even(40, 42, 44);\n=> true\n\nis.any.even(39, 42, 43);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.even([40, 42, 43]);\n=> false\n```\n\nis.odd(value:number)\n--------------------\n#### Checks if the given value is odd.\ninterfaces: not, all, any\n\n```javascript\nis.odd(41);\n=> true\n\nis.not.odd(42);\n=> true\n\nis.all.odd(39, 41, 43);\n=> true\n\nis.any.odd(39, 42, 44);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.odd([40, 42, 43]);\n=> false\n```\n\nis.positive(value:number)\n-------------------------\n#### Checks if the given value is positive.\ninterfaces: not, all, any\n\n```javascript\nis.positive(41);\n=> true\n\nis.not.positive(-42);\n=> true\n\nis.all.positive(39, 41, 43);\n=> true\n\nis.any.positive(-39, 42, -44);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.positive([40, 42, -43]);\n=> false\n```\n\nis.negative(value:number)\n-------------------------\n#### Checks if the given value is negative.\ninterfaces: not, all, any\n\n```javascript\nis.negative(-41);\n=> true\n\nis.not.negative(42);\n=> true\n\nis.all.negative(-39, -41, -43);\n=> true\n\nis.any.negative(-39, 42, 44);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.negative([40, 42, -43]);\n=> false\n```\n\nis.above(value:number, min:number)\n---------------------------\n#### Checks if the given value is above minimum value.\ninterface: not\n\n```javascript\nis.above(41, 30);\n=> true\n\nis.not.above(42, 50);\n=> true\n```\n\nis.under(value:number, max:number)\n---------------------------\n#### Checks if the given value is under maximum value.\ninterface: not\n\n```javascript\nis.under(30, 35);\n=> true\n\nis.not.under(42, 30);\n=> true\n```\n\nis.within(value:number, min:number, max:number)\n---------------------------------\n#### Checks if the given value is within minimum and maximum values.\ninterface: not\n\n```javascript\nis.within(30, 20, 40);\n=> true\n\nis.not.within(40, 30, 35);\n=> true\n```\n\nis.decimal(value:number)\n------------------------\n#### Checks if the given value is decimal.\ninterfaces: not, all, any\n\n```javascript\nis.decimal(41.5);\n=> true\n\nis.not.decimal(42);\n=> true\n\nis.all.decimal(39.5, 41.5, -43.5);\n=> true\n\nis.any.decimal(-39, 42.5, 44);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.decimal([40, 42.5, -43]);\n=> false\n```\n\nis.integer(value:number)\n------------------------\n#### Checks if the given value is integer.\ninterfaces: not, all, any\n\n```javascript\nis.integer(41);\n=> true\n\nis.not.integer(42.5);\n=> true\n\nis.all.integer(39, 41, -43);\n=> true\n\nis.any.integer(-39, 42.5, 44);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.integer([40, 42.5, -43]);\n=> false\n```\n\nis.finite(value:number)\n-----------------------\n#### Checks if the given value is finite.\ninterfaces: not, all, any\n\n```javascript\nis.finite(41);\n=> true\n\nis.not.finite(42 / 0);\n=> true\n\nis.all.finite(39, 41, -43);\n=> true\n\nis.any.finite(-39, Infinity, 44);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.finite([Infinity, -Infinity, 42.5]);\n=> false\n```\n\nis.infinite(value:number)\n-------------------------\n#### Checks if the given value is infinite.\ninterfaces: not, all, any\n\n```javascript\nis.infinite(Infinity);\n=> true\n\nis.not.infinite(42);\n=> true\n\nis.all.infinite(Infinity, -Infinity, -43 / 0);\n=> true\n\nis.any.infinite(-39, Infinity, 44);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.infinite([Infinity, -Infinity, 42.5]);\n=> false\n```\n\nObject checks\n=============\n\nis.propertyCount(value:object, count:number)\n-------------------------------------\n#### Checks if objects' property count is equal to given count.\ninterface: not\n\n```javascript\nis.propertyCount({this: 'is', 'sample': object}, 2);\n=> true\n\nis.propertyCount({this: 'is', 'sample': object}, 3);\n=> false\n\nis.not.propertyCount({}, 2);\n=> true\n```\n\nis.propertyDefined(value:object, property:string)\n------------------------------------------\n#### Checks if the given property is defined on object.\ninterface: not\n\n```javascript\nis.propertyDefined({yeap: 'yeap'}, 'yeap');\n=> true\n\nis.propertyDefined({yeap: 'yeap'}, 'nope');\n=> false\n\nis.not.propertyDefined({}, 'nope');\n=> true\n```\n\nArray checks\n============\n\nis.inArray(value:any, array)\n---------------------\n#### Checks if the given item is in array?\ninterface: not\n```javascript\nis.inArray(2, [1, 2, 3]);\n=> true\n\nis.inArray(4, [1, 2, 3]);\n=> false\n\nis.not.inArray(4, [1, 2, 3]);\n=> true\n```\n\nis.sorted(value:array, sign:string)\n----------------------\n#### Checks if the given array is sorted. Sign is optional parameter.\ninterfaces: not, all, any\n\n```javascript\nis.sorted([1, 2, 3]);\n=> true\n\nis.sorted([1, 2, 4, 3]);\n=> false\n\nis.sorted([1, 1, 2, 2], '>=');\n=> true\n\nis.sorted([1, 2, 3, 4], '>');\n=> true\n\nis.sorted([4, 3, 3, 1], '<=');\n=> true\n\nis.sorted([4, 3, 2, 1], '<');\n=> true\n\nis.sorted([1, 2, 3, 3], '>');\n=> false\n\nis.not.sorted([5, 4, 3]);\n=> true\n\nis.not.sorted([5, 4, 3], '<');\n=> false\n\nis.all.sorted([1, 2], [3, 4]);\n=> true\n\nis.any.sorted([1, 2], [5, 4]);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.sorted([[1, 2], [5, 4]]);\n=> false\n```\n\nEnvironment checks\n==================\n#### Environment checks are not available as node module.\n\nis.ie(range:number|string)\n-------------------\n#### Checks if current browser is ie. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.ie();\n=> true if current browser is ie\n\nis.not.ie();\n=> false if current browser is ie\n\n// also supports version number\nis.ie(10);\n=> true if current version of ie is 10\n\nis.ie('>=10');\n=> true if current version of ie is greater than or equal to 10\n\nis.not.ie('<9');\n=> true if current version of ie is not less than 9\n```\n\nis.chrome(range:number|string)\n-----------\n#### Checks if current browser is chrome. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.chrome();\n=> true if current browser is chrome\n\nis.not.chrome();\n=> false if current browser is chrome\n\n// also supports version number\nis.chrome(50);\n=> true if current version of chrome is 50\n\nis.chrome('>=40');\n=> true if current version of chrome is greater than or equal to 40\n\nis.not.chrome('<30');\n=> true if current version of chrome is not less than 30\n```\n\nis.firefox(range:number|string)\n------------\n#### Checks if current browser is firefox. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.firefox();\n=> true if current browser is firefox\n\nis.not.firefox();\n=> false if current browser is firefox\n\n// also supports version number\nis.firefox(41);\n=> true if current version of firefox is 41\n\nis.firefox('>=40');\n=> true if current version of firefox is greater than or equal to 40\n\nis.not.firefox('<30');\n=> true if current version of firefox is not less than 30\n```\n\nis.edge(range:number|string)\n------------\n#### Checks if current browser is edge. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.edge();\n=> true if current browser is edge\n\nis.not.edge();\n=> false if current browser is edge\n\n// also supports version number\nis.edge(13);\n=> true if current version of edge is 13\n\nis.edge('>=12');\n=> true if current version of edge is greater than or equal to 12\n\nis.not.edge('<13');\n=> true if current version of edge is not less than 13\n```\n\nis.opera(range:number|string)\n----------\n#### Checks if current browser is opera. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.opera();\n=> true if current browser is opera\n\nis.not.opera();\n=> false if current browser is opera\n\n// also supports version number\nis.opera(36);\n=> true if current version of opera is 36\n\nis.opera('>=35');\n=> true if current version of opera is greater than or equal to 35\n\nis.not.opera('<20');\n=> true if current version of opera is not less than 20\n```\n\nis.safari(range:number|string)\n-----------\n#### Checks if current browser is safari. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.safari();\n=> true if current browser is safari\n\nis.not.safari();\n=> false if current browser is safari\n\n// also supports version number\nis.safari(9);\n=> true if current version of safari is 9\n\nis.safari('>=8');\n=> true if current version of safari is greater than or equal to 8\n\nis.not.safari('<7');\n=> true if current version of safari is not less than 7\n```\n\nis.phantom(range:number|string)\n-----------\n#### Checks if current browser is phantomjs. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.phantom();\n=> true if current browser is phantomjs\n\nis.not.phantom();\n=> false if current browser is phantomjs\n\n// also supports version number\nis.phantom(2);\n=> true if current version of phantom is 2\n\nis.phantom('>=1');\n=> true if current version of phantomjs is greater than or equal to 1\n\nis.not.phantom('<2');\n=> true if current version of phantomjs is not less than 2\n```\n\nis.ios()\n--------\n#### Checks if current device has ios.\ninterface: not\n\n```javascript\nis.ios();\n=> true if current device is iPhone, iPad or iPod\n\nis.not.ios();\n=> true if current device is not iPhone, iPad or iPod\n```\n\nis.iphone(range:number|string)\n-----------\n#### Checks if current device is iPhone. Parameter is optional version range (or number) of browser.\ninterface: not\n\n```javascript\nis.iphone();\n=> true if current device is iPhone\n\nis.not.iphone();\n=> true if current device is not iPhone\n\n// also supports version number\nis.iphone(9);\n=> true if current version of iPhone is 9\n\nis.iphone('>=7');\n=> true if current version of iPhone is greater than or equal to 7\n\nis.not.iphone('<8');\n=> true if current version of iPhone is not less than 8\n```\n\nis.ipad(range:number|string)\n---------\n#### Checks if current device is iPad.\ninterface: not\n\n```javascript\nis.ipad();\n=> true if current device is iPad\n\nis.not.ipad();\n=> true if current device is not iPad\n\n// also supports version number\nis.ipad(9);\n=> true if current version of iPad is 9\n\nis.ipad('>=7');\n=> true if current version of iPad is greater than or equal to 7\n\nis.not.ipad('<8');\n=> true if current version of iPad is not less than 8\n```\n\nis.ipod(range:number|string)\n---------\n#### Checks if current device is iPod.\ninterface: not\n\n```javascript\nis.ipod();\n=> true if current device is iPod\n\nis.not.ipod();\n=> true if current device is not iPod\n\n// also supports version number\nis.ipod(7);\n=> true if current version of iPod is 7\n\nis.ipod('>=5');\n=> true if current version of iPod is greater than or equal to 5\n\nis.not.ipod('<5');\n=> true if current version of iPod is not less than 5\n```\n\nis.android()\n------------\n#### Checks if current device has Android.\ninterface: not\n\n```javascript\nis.android();\n=> true if current device has Android OS\n\nis.not.android();\n=> true if current device has not Android OS\n```\n\nis.androidPhone()\n-----------------\n#### Checks if current device is Android phone.\ninterface: not\n\n```javascript\nis.androidPhone();\n=> true if current device is Android phone\n\nis.not.androidPhone();\n=> true if current device is not Android phone\n```\n\nis.androidTablet()\n------------------\n#### Checks if current device is Android tablet.\ninterface: not\n\n```javascript\nis.androidTablet();\n=> true if current device is Android tablet\n\nis.not.androidTablet();\n=> true if current device is not Android tablet\n```\n\nis.blackberry()\n---------------\n#### Checks if current device is Blackberry.\ninterface: not\n\n```javascript\nis.blackberry();\n=> true if current device is Blackberry\n\nis.not.blackberry();\n=> true if current device is not Blackberry\n```\n\nis.windowsPhone()\n-----------------\n#### Checks if current device is Windows phone.\ninterface: not\n\n```javascript\nis.windowsPhone();\n=> true if current device is Windows phone\n\nis.not.windowsPhone();\n=> true if current device is not Windows Phone\n```\n\nis.windowsTablet()\n------------------\n#### Checks if current device is Windows tablet.\ninterface: not\n\n```javascript\nis.windowsTablet();\n=> true if current device is Windows tablet\n\nis.not.windowsTablet();\n=> true if current device is not Windows tablet\n```\n\nis.windows()\n------------\n#### Checks if current OS is Windows.\ninterface: not\n\n```javascript\nis.windows();\n=> true if current OS is Windows\n\nis.not.windows();\n=> true if current OS is not Windows\n```\n\nis.mac()\n--------\n#### Checks if current OS is Mac OS X.\ninterface: not\n\n```javascript\nis.mac();\n=> true if current OS is Mac OS X\n\nis.not.mac();\n=> true if current OS is not Mac OS X\n```\n\nis.linux()\n----------\n#### Checks if current OS is linux.\ninterface: not\n\n```javascript\nis.linux();\n=> true if current OS is linux\n\nis.not.linux();\n=> true if current OS is not linux\n```\n\nis.desktop()\n------------\n#### Checks if current device is desktop.\ninterface: not\n\n```javascript\nis.desktop();\n=> true if current device is desktop\n\nis.not.desktop();\n=> true if current device is not desktop\n```\n\nis.mobile()\n-----------\n#### Checks if current device is mobile.\ninterface: not\niPhone, iPod, Android Phone, Windows Phone, Blackberry.\n```javascript\n\nis.mobile();\n=> true if current device is mobile\n\nis.not.mobile();\n=> true if current device is not mobile\n```\n\nis.tablet()\n-----------\n#### Checks if current device is tablet.\ninterface: not\niPad, Android Tablet, Windows Tablet\n```javascript\n\nis.tablet();\n=> true if current device is tablet\n\nis.not.tablet();\n=> true if current device is not tablet\n```\n\nis.online()\n-----------\n#### Checks if current device is online.\ninterface: not\n\n```javascript\nis.online();\n=> true if current device is online\n\nis.not.online();\n=> true if current device is not online\n```\n\nis.offline()\n------------\n#### Checks if current device is offline.\ninterface: not\n\n```javascript\nis.offline();\n=> true if current device is offline\n\nis.not.offline();\n=> true if current device is not offline\n```\n\nis.touchDevice()\n------------\n#### Checks if current device supports touch.\ninterface: not\n\n```javascript\nis.touchDevice();\n=> true if current device supports touch\n\nis.not.touchDevice();\n=> true if current device does not support touch\n```\n\nTime checks\n===========\n\nis.today(value:date)\n----------------------\n#### Checks if the given date object indicate today.\ninterfaces: not, all, any\n\n```javascript\nvar today = new Date();\nis.today(today);\n=> true\n\nvar yesterday = new Date(new Date().setDate(new Date().getDate() - 1));\nis.today(yesterday);\n=> false\n\nis.not.today(yesterday);\n=> true\n\nis.all.today(today, today);\n=> true\n\nis.any.today(today, yesterday);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.today([today, yesterday]);\n=> false\n```\n\nis.yesterday(value:date)\n--------------------------\n#### Checks if the given date object indicate yesterday.\ninterfaces: not, all, any\n\n```javascript\nvar today = new Date();\nis.yesterday(today);\n=> false\n\nvar yesterday = new Date(new Date().setDate(new Date().getDate() - 1));\nis.yesterday(yesterday);\n=> true\n\nis.not.yesterday(today);\n=> true\n\nis.all.yesterday(yesterday, today);\n=> false\n\nis.any.yesterday(today, yesterday);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.yesterday([today, yesterday]);\n=> false\n```\n\nis.tomorrow(value:date)\n-------------------------\n#### Checks if the given date object indicate tomorrow.\ninterfaces: not, all, any\n\n```javascript\nvar today = new Date();\nis.tomorrow(today);\n=> false\n\nvar tomorrow = new Date(new Date().setDate(new Date().getDate() + 1));\nis.tomorrow(tomorrow);\n=> true\n\nis.not.tomorrow(today);\n=> true\n\nis.all.tomorrow(tomorrow, today);\n=> false\n\nis.any.tomorrow(today, tomorrow);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.tomorrow([today, tomorrow]);\n=> false\n```\n\nis.past(value:date)\n---------------------\n#### Checks if the given date object indicate past.\ninterfaces: not, all, any\n\n```javascript\nvar yesterday = new Date(new Date().setDate(new Date().getDate() - 1));\nvar tomorrow = new Date(new Date().setDate(new Date().getDate() + 1));\n\nis.past(yesterday);\n=> true\n\nis.past(tomorrow);\n=> false\n\nis.not.past(tomorrow);\n=> true\n\nis.all.past(tomorrow, yesterday);\n=> false\n\nis.any.past(yesterday, tomorrow);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.past([yesterday, tomorrow]);\n=> false\n```\n\nis.future(value:date)\n-----------------------\n#### Checks if the given date object indicate future.\ninterfaces: not, all, any\n\n```javascript\nvar yesterday = new Date(new Date().setDate(new Date().getDate() - 1));\nvar tomorrow = new Date(new Date().setDate(new Date().getDate() + 1));\n\nis.future(yesterday);\n=> false\n\nis.future(tomorrow);\n=> true\n\nis.not.future(yesterday);\n=> true\n\nis.all.future(tomorrow, yesterday);\n=> false\n\nis.any.future(yesterday, tomorrow);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.future([yesterday, tomorrow]);\n=> false\n```\n\nis.day(value:date, day:string)\n-------------------------------\n#### Checks if the given date objects' day equal given dayString parameter.\ninterface: not\n\n```javascript\nvar mondayObj = new Date('01/26/2015');\nvar tuesdayObj = new Date('01/27/2015');\nis.day(mondayObj, 'monday');\n=> true\n\nis.day(mondayObj, 'tuesday');\n=> false\n\nis.not.day(mondayObj, 'tuesday');\n=> true\n```\n\nis.month(value:date, month:string)\n-----------------------------------\n#### Checks if the given date objects' month equal given monthString parameter.\ninterface: not\n\n```javascript\nvar januaryObj = new Date('01/26/2015');\nvar februaryObj = new Date('02/26/2015');\nis.month(januaryObj, 'january');\n=> true\n\nis.month(februaryObj, 'january');\n=> false\n\nis.not.month(februaryObj, 'january');\n=> true\n```\n\nis.year(value:date, year:number)\n---------------------------------\n#### Checks if the given date objects' year equal given yearNumber parameter.\ninterface: not\n\n```javascript\nvar year2015 = new Date('01/26/2015');\nvar year2016 = new Date('01/26/2016');\nis.year(year2015, 2015);\n=> true\n\nis.year(year2016, 2015);\n=> false\n\nis.not.year(year2016, 2015);\n=> true\n```\n\nis.leapYear(value:number)\n---------------------------------\n#### Checks if the given year number is a leap year\ninterfaces: not, all, any\n\n```javascript\nis.leapYear(2016);\n=> true\n\nis.leapYear(2015);\n=> false\n\nis.not.leapYear(2015);\n=> true\n\nis.all.leapYear(2015, 2016);\n=> false\n\nis.any.leapYear(2015, 2016);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.leapYear([2016, 2080]);\n=> true\n```\n\nis.weekend(value:date)\n------------------------\n#### Checks if the given date objects' day is weekend.\ninterfaces: not, all, any\n\n```javascript\nvar monday = new Date('01/26/2015');\nvar sunday = new Date('01/25/2015');\nvar saturday = new Date('01/24/2015');\nis.weekend(sunday);\n=> true\n\nis.weekend(monday);\n=> false\n\nis.not.weekend(monday);\n=> true\n\nis.all.weekend(sunday, saturday);\n=> true\n\nis.any.weekend(sunday, saturday, monday);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.weekend([sunday, saturday, monday]);\n=> false\n```\n\nis.weekday(value:date)\n------------------------\n#### Checks if the given date objects' day is weekday.\ninterfaces: not, all, any\n\n```javascript\nvar monday = new Date('01/26/2015');\nvar sunday = new Date('01/25/2015');\nvar saturday = new Date('01/24/2015');\nis.weekday(monday);\n=> true\n\nis.weekday(sunday);\n=> false\n\nis.not.weekday(sunday);\n=> true\n\nis.all.weekday(monday, saturday);\n=> false\n\nis.any.weekday(sunday, saturday, monday);\n=> true\n\n// 'all' and 'any' interfaces can also take array parameter\nis.all.weekday([sunday, saturday, monday]);\n=> false\n```\n\nis.inDateRange(value:date, start:date, end:date)\n----------------------------------------------------\n#### Checks if date is within given range.\ninterface: not\n\n```javascript\nvar saturday = new Date('01/24/2015');\nvar sunday = new Date('01/25/2015');\nvar monday = new Date('01/26/2015');\nis.inDateRange(sunday, saturday, monday);\n=> true\n\nis.inDateRange(saturday, sunday, monday);\n=> false\n\nis.not.inDateRange(saturday, sunday, monday);\n=> true\n```\n\nis.inLastWeek(value:date)\n---------------------------\n#### Checks if the given date is between now and 7 days ago.\ninterface: not\n\n```javascript\nvar twoDaysAgo = new Date(new Date().setDate(new Date().getDate() - 2));\nvar nineDaysAgo = new Date(new Date().setDate(new Date().getDate() - 9));\nis.inLastWeek(twoDaysAgo);\n=> true\n\nis.inLastWeek(nineDaysAgo);\n=> false\n\nis.not.inLastWeek(nineDaysAgo);\n=> true\n```\n\nis.inLastMonth(value:date)\n----------------------------\n#### Checks if the given date is between now and a month ago.\ninterface: not\n\n```javascript\nvar tenDaysAgo = new Date(new Date().setDate(new Date().getDate() - 10));\nvar fortyDaysAgo = new Date(new Date().setDate(new Date().getDate() - 40));\nis.inLastMonth(tenDaysAgo);\n=> true\n\nis.inLastMonth(fortyDaysAgo);\n=> false\n\nis.not.inLastMonth(fortyDaysAgo);\n=> true\n```\n\nis.inLastYear(value:date)\n---------------------------\n#### Checks if the given date is between now and a year ago.\ninterface: not\n\n```javascript\nvar twoMonthsAgo = new Date(new Date().setMonth(new Date().getMonth() - 2));\nvar thirteenMonthsAgo = new Date(new Date().setMonth(new Date().getMonth() - 13));\nis.inLastYear(twoMonthsAgo);\n=> true\n\nis.inLastYear(thirteenMonthsAgo);\n=> false\n\nis.not.inLastYear(thirteenMonthsAgo);\n=> true\n```\n\nis.inNextWeek(value:date)\n---------------------------\n#### Checks if the given date is between now and 7 days later.\ninterface: not\n\n```javascript\nvar twoDaysLater = new Date(new Date().setDate(new Date().getDate() + 2));\nvar nineDaysLater = new Date(new Date().setDate(new Date().getDate() + 9));\nis.inNextWeek(twoDaysLater);\n=> true\n\nis.inNextWeek(nineDaysLater);\n=> false\n\nis.not.inNextWeek(nineDaysLater);\n=> true\n```\n\nis.inNextMonth(value:date)\n----------------------------\n#### Checks if the given date is between now and a month later.\ninterface: not\n\n```javascript\nvar tenDaysLater = new Date(new Date().setDate(new Date().getDate() + 10));\nvar fortyDaysLater = new Date(new Date().setDate(new Date().getDate() + 40));\nis.inNextMonth(tenDaysLater);\n=> true\n\nis.inNextMonth(fortyDaysLater);\n=> false\n\nis.not.inNextMonth(fortyDaysLater);\n=> true\n```\n\nis.inNextYear(value:date)\n---------------------------\n#### Checks if the given date is between now and a year later.\ninterface: not\n\n```javascript\nvar twoMonthsLater = new Date(new Date().setMonth(new Date().getMonth() + 2));\nvar thirteenMonthsLater = new Date(new Date().setMonth(new Date().getMonth() + 13));\nis.inNextYear(twoMonthsLater);\n=> true\n\nis.inNextYear(thirteenMonthsLater);\n=> false\n\nis.not.inNextYear(thirteenMonthsLater);\n=> true\n```\n\nis.quarterOfYear(value:date, quarter:number)\n---------------------------------------------\n#### Checks if the given date is in the parameter quarter.\ninterface: not\n\n```javascript\nvar firstQuarter = new Date('01/26/2015');\nvar secondQuarter = new Date('05/26/2015');\nis.quarterOfYear(firstQuarter, 1);\n=> true\n\nis.quarterOfYear(secondQuarter, 1);\n=> false\n\nis.not.quarterOfYear(secondQuarter, 1);\n=> true\n```\n\nis.dayLightSavingTime(value:date)\n--------------------------------------------------\n#### Checks if the given date is in daylight saving time.\ninterface: not\n\n```javascript\n// For Turkey Time Zone\nvar january1 = new Date('01/01/2015');\nvar june1 = new Date('06/01/2015');\n\nis.dayLightSavingTime(june1);\n=> true\n\nis.dayLightSavingTime(january1);\n=> false\n\nis.not.dayLightSavingTime(january1);\n=> true\n```\n\nConfiguration methods\n=====================\n\nis.setNamespace()\n-----------------\nChange namespace of library to prevent name collisions.\n\n```javascript\nvar customName = is.setNamespace();\ncustomName.odd(3);\n=> true\n```\n\nis.setRegexp(value:regexp, name:string)\n----------------------------------------\nOverride RegExps if you think they suck.\n\n```javascript\nis.url('https://www.duckduckgo.com');\n=> true\n\nis.setRegexp(/quack/, 'url');\nis.url('quack');\n=> true\n```\n"
  },
  {
    "path": "bower.json",
    "content": "{\n  \"name\": \"is_js\",\n  \"main\": \"is.js\",\n  \"ignore\": [\n    \"bower_components\",\n    \"node_modules\",\n    \"test\",\n    \"**/.*\",\n    \"**/*.md\",\n    \"package.json\"\n  ]\n}\n"
  },
  {
    "path": "is.js",
    "content": "/*!\n * is.js 0.9.0\n * Author: Aras Atasaygin\n */\n\n// AMD with global, Node, or global\n;(function(root, factory) {    // eslint-disable-line no-extra-semi\n    if (typeof define === 'function' && define.amd) {\n        // AMD. Register as an anonymous module.\n        define(function() {\n            // Also create a global in case some scripts\n            // that are loaded still are looking for\n            // a global even when an AMD loader is in use.\n            return (root.is = factory());\n        });\n    } else if (typeof exports === 'object') {\n        // Node. Does not work with strict CommonJS, but\n        // only CommonJS-like enviroments that support module.exports,\n        // like Node.\n        module.exports = factory();\n    } else {\n        // Browser globals (root is self)\n        root.is = factory();\n    }\n}(this, function() {\n\n    // Baseline\n    /* -------------------------------------------------------------------------- */\n\n    // define 'is' object and current version\n    var is = {};\n    is.VERSION = '0.9.0';\n\n    // define interfaces\n    is.not = {};\n    is.all = {};\n    is.any = {};\n\n    // cache some methods to call later on\n    var toString = Object.prototype.toString;\n    var slice = Array.prototype.slice;\n    var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n    // helper function which reverses the sense of predicate result\n    function not(func) {\n        return function() {\n            return !func.apply(null, slice.call(arguments));\n        };\n    }\n\n    // helper function which call predicate function per parameter and return true if all pass\n    function all(func) {\n        return function() {\n            var params = getParams(arguments);\n            var length = params.length;\n            for (var i = 0; i < length; i++) {\n                if (!func.call(null, params[i])) {\n                    return false;\n                }\n            }\n            return true;\n        };\n    }\n\n    // helper function which call predicate function per parameter and return true if any pass\n    function any(func) {\n        return function() {\n            var params = getParams(arguments);\n            var length = params.length;\n            for (var i = 0; i < length; i++) {\n                if (func.call(null, params[i])) {\n                    return true;\n                }\n            }\n            return false;\n        };\n    }\n\n    // build a 'comparator' object for various comparison checks\n    var comparator = {\n        '<': function(a, b) { return a < b; },\n        '<=': function(a, b) { return a <= b; },\n        '>': function(a, b) { return a > b; },\n        '>=': function(a, b) { return a >= b; }\n    };\n\n    // helper function which compares a version to a range\n    function compareVersion(version, range) {\n        var string = (range + '');\n        var n = +(string.match(/\\d+/) || NaN);\n        var op = string.match(/^[<>]=?|/)[0];\n        return comparator[op] ? comparator[op](version, n) : (version == n || n !== n);\n    }\n\n    // helper function which extracts params from arguments\n    function getParams(args) {\n        var params = slice.call(args);\n        var length = params.length;\n        if (length === 1 && is.array(params[0])) {    // support array\n            params = params[0];\n        }\n        return params;\n    }\n\n    // Type checks\n    /* -------------------------------------------------------------------------- */\n\n    // is a given value Arguments?\n    is.arguments = function(value) {    // fallback check is for IE\n        return toString.call(value) === '[object Arguments]' ||\n            (value != null && typeof value === 'object' && 'callee' in value);\n    };\n\n    // is a given value Array?\n    is.array = Array.isArray || function(value) {    // check native isArray first\n        return toString.call(value) === '[object Array]';\n    };\n\n    // is a given value Boolean?\n    is.boolean = function(value) {\n        return value === true || value === false || toString.call(value) === '[object Boolean]';\n    };\n\n    // is a given value Char?\n    is.char = function(value) {\n        return is.string(value) && value.length === 1;\n    };\n\n    // is a given value Date Object?\n    is.date = function(value) {\n        return toString.call(value) === '[object Date]';\n    };\n\n    // is a given object a DOM node?\n    is.domNode = function(object) {\n        return is.object(object) && object.nodeType > 0;\n    };\n\n    // is a given value Error object?\n    is.error = function(value) {\n        return toString.call(value) === '[object Error]';\n    };\n\n    // is a given value function?\n    is['function'] = function(value) {    // fallback check is for IE\n        return toString.call(value) === '[object Function]' || typeof value === 'function';\n    };\n\n    // is given value a pure JSON object?\n    is.json = function(value) {\n        return toString.call(value) === '[object Object]';\n    };\n\n    // is a given value NaN?\n    is.nan = function(value) {\n        return Number.isNaN(value);\n    };\n\n    // is a given value null?\n    is['null'] = function(value) {\n        return value === null;\n    };\n\n    // is a given value number?\n    is.number = function(value) {\n        return Number.isFinite(value);\n    };\n\n    // is a given value object?\n    is.object = function(value) {\n        return Object(value) === value;\n    };\n\n    // is a given value RegExp?\n    is.regexp = function(value) {\n        return toString.call(value) === '[object RegExp]';\n    };\n\n    // are given values same type?\n    // prevent NaN, Number same type check\n    is.sameType = function(value, other) {\n        var tag = toString.call(value);\n        if (tag !== toString.call(other)) {\n            return false;\n        }\n        if (tag === '[object Number]') {\n            return !is.any.nan(value, other) || is.all.nan(value, other);\n        }\n        return true;\n    };\n    // sameType method does not support 'all' and 'any' interfaces\n    is.sameType.api = ['not'];\n\n    // is a given value String?\n    is.string = function(value) {\n        return toString.call(value) === '[object String]';\n    };\n\n    // is a given value undefined?\n    is.undefined = function(value) {\n        return value === void 0;\n    };\n\n    // is a given value window?\n    // setInterval method is only available for window object\n    is.windowObject = function(value) {\n        return value != null && typeof value === 'object' && 'setInterval' in value;\n    };\n\n    // Presence checks\n    /* -------------------------------------------------------------------------- */\n\n    //is a given value empty? Objects, arrays, strings\n    is.empty = function(value) {\n        if (is.object(value)) {\n            var length = Object.getOwnPropertyNames(value).length;\n            if (length === 0 || (length === 1 && is.array(value)) ||\n                    (length === 2 && is.arguments(value))) {\n                return true;\n            }\n            return false;\n        }\n        return value === '';\n    };\n\n    // is a given value existy?\n    is.existy = function(value) {\n        return value != null;\n    };\n\n    // is a given value falsy?\n    is.falsy = function(value) {\n        return !value;\n    };\n\n    // is a given value truthy?\n    is.truthy = not(is.falsy);\n\n    // Arithmetic checks\n    /* -------------------------------------------------------------------------- */\n\n    // is a given number above minimum parameter?\n    is.above = function(n, min) {\n        return is.all.number(n, min) && n > min;\n    };\n    // above method does not support 'all' and 'any' interfaces\n    is.above.api = ['not'];\n\n    // is a given number decimal?\n    is.decimal = function(n) {\n        return is.number(n) && n % 1 !== 0;\n    };\n\n    // are given values equal? supports numbers, strings, regexes, booleans\n    // TODO: Add object and array support\n    is.equal = function(value, other) {\n        // check 0 and -0 equity with Infinity and -Infinity\n        if (is.all.number(value, other)) {\n            return value === other && 1 / value === 1 / other;\n        }\n        // check regexes as strings too\n        if (is.all.string(value, other) || is.all.regexp(value, other)) {\n            return '' + value === '' + other;\n        }\n        if (is.all.boolean(value, other)) {\n            return value === other;\n        }\n        return false;\n    };\n    // equal method does not support 'all' and 'any' interfaces\n    is.equal.api = ['not'];\n\n    // is a given number even?\n    is.even = function(n) {\n        return is.number(n) && n % 2 === 0;\n    };\n\n    // is a given number finite?\n    is.finite = isFinite || function(n) {\n        return is.not.infinite(n) && is.not.nan(n);\n    };\n\n    // is a given number infinite?\n    is.infinite = function(n) {\n        return n === Infinity || n === -Infinity;\n    };\n\n    // is a given number integer?\n    is.integer = function(n) {\n        return Number.isInteger(n);\n    };\n\n    // is a given number negative?\n    is.negative = function(n) {\n        return is.number(n) && n < 0;\n    };\n\n    // is a given number odd?\n    is.odd = function(n) {\n        return is.number(n) && (n % 2 === 1 || n % 2 === -1);\n    };\n\n    // is a given number positive?\n    is.positive = function(n) {\n        return is.number(n) && n > 0;\n    };\n\n    // is a given number above maximum parameter?\n    is.under = function(n, max) {\n        return is.all.number(n, max) && n < max;\n    };\n    // least method does not support 'all' and 'any' interfaces\n    is.under.api = ['not'];\n\n    // is a given number within minimum and maximum parameters?\n    is.within = function(n, min, max) {\n        return is.all.number(n, min, max) && n > min && n < max;\n    };\n    // within method does not support 'all' and 'any' interfaces\n    is.within.api = ['not'];\n\n    // Regexp checks\n    /* -------------------------------------------------------------------------- */\n    // Steven Levithan, Jan Goyvaerts: Regular Expressions Cookbook\n    // Scott Gonzalez: Email address validation\n\n    // dateString match m/d/yy and mm/dd/yyyy, allowing any combination of one or two digits for the day and month, and two or four digits for the year\n    // eppPhone match extensible provisioning protocol format\n    // nanpPhone match north american number plan format\n    // time match hours, minutes, and seconds, 24-hour clock\n    var regexes = {\n        affirmative: /^(?:1|t(?:rue)?|y(?:es)?|ok(?:ay)?)$/,\n        alphaNumeric: /^[A-Za-z0-9]+$/,\n        caPostalCode: /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z]\\s?[0-9][A-Z][0-9]$/,\n        creditCard: /^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/,\n        dateString: /^(1[0-2]|0?[1-9])([\\/-])(3[01]|[12][0-9]|0?[1-9])(?:\\2)(?:[0-9]{2})?[0-9]{2}$/,\n        email: /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i, // eslint-disable-line no-control-regex\n        eppPhone: /^\\+[0-9]{1,3}\\.[0-9]{4,14}(?:x.+)?$/,\n        hexadecimal: /^(?:0x)?[0-9a-fA-F]+$/,\n        hexColor: /^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,\n        ipv4: /^(?:(?:\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])$/,\n        ipv6: /^((?=.*::)(?!.*::.+::)(::)?([\\dA-F]{1,4}:(:|\\b)|){5}|([\\dA-F]{1,4}:){6})((([\\dA-F]{1,4}((?!\\3)::|:\\b|$))|(?!\\2\\3)){2}|(((2[0-4]|1\\d|[1-9])?\\d|25[0-5])\\.?\\b){4})$/i,\n        nanpPhone: /^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/,\n        socialSecurityNumber: /^(?!000|666)[0-8][0-9]{2}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4}$/,\n        timeString: /^(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])$/,\n        ukPostCode: /^[A-Z]{1,2}[0-9RCHNQ][0-9A-Z]?\\s?[0-9][ABD-HJLNP-UW-Z]{2}$|^[A-Z]{2}-?[0-9]{4}$/,\n        url: /^(?:(?:https?|ftp):\\/\\/)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:\\/\\S*)?$/i,\n        usZipCode: /^[0-9]{5}(?:-[0-9]{4})?$/\n    };\n\n    function regexpCheck(regexp, regexes) {\n        is[regexp] = function(value) {\n            return is.existy(value) && regexes[regexp].test(value);\n        };\n    }\n\n    // create regexp checks methods from 'regexes' object\n    for (var regexp in regexes) {\n        if (regexes.hasOwnProperty(regexp)) {\n            regexpCheck(regexp, regexes);\n        }\n    }\n\n    // simplify IP checks by calling the regex helpers for IPv4 and IPv6\n    is.ip = function(value) {\n        return is.ipv4(value) || is.ipv6(value);\n    };\n\n    // String checks\n    /* -------------------------------------------------------------------------- */\n\n    // is a given string or sentence capitalized?\n    is.capitalized = function(string) {\n        if (is.not.string(string)) {\n            return false;\n        }\n        var words = string.split(' ');\n        for (var i = 0; i < words.length; i++) {\n            var word = words[i];\n            if (word.length) {\n                var chr = word.charAt(0);\n                if (chr !== chr.toUpperCase()) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    };\n\n    // is string end with a given target parameter?\n    is.endWith = function(string, target) {\n        if (is.not.string(string)) {\n            return false;\n        }\n        target += '';\n        var position = string.length - target.length;\n        return position >= 0 && string.indexOf(target, position) === position;\n    };\n    // endWith method does not support 'all' and 'any' interfaces\n    is.endWith.api = ['not'];\n\n    // is a given string include parameter target?\n    is.include = function(string, target) {\n        return string.indexOf(target) > -1;\n    };\n    // include method does not support 'all' and 'any' interfaces\n    is.include.api = ['not'];\n\n    // is a given string all lowercase?\n    is.lowerCase = function(string) {\n        return is.string(string) && string === string.toLowerCase();\n    };\n\n    // is a given string palindrome?\n    is.palindrome = function(string) {\n        if (is.not.string(string)) {\n            return false;\n        }\n        string = string.replace(/[^a-zA-Z0-9]+/g, '').toLowerCase();\n        var length = string.length - 1;\n        for (var i = 0, half = Math.floor(length / 2); i <= half; i++) {\n            if (string.charAt(i) !== string.charAt(length - i)) {\n                return false;\n            }\n        }\n        return true;\n    };\n\n    // is a given value space?\n    // horizontal tab: 9, line feed: 10, vertical tab: 11, form feed: 12, carriage return: 13, space: 32\n    is.space = function(value) {\n        if (is.not.char(value)) {\n            return false;\n        }\n        var charCode = value.charCodeAt(0);\n        return (charCode > 8 && charCode < 14) || charCode === 32;\n    };\n\n    // is string start with a given target parameter?\n    is.startWith = function(string, target) {\n        return is.string(string) && string.indexOf(target) === 0;\n    };\n    // startWith method does not support 'all' and 'any' interfaces\n    is.startWith.api = ['not'];\n\n    // is a given string all uppercase?\n    is.upperCase = function(string) {\n        return is.string(string) && string === string.toUpperCase();\n    };\n\n    // Time checks\n    /* -------------------------------------------------------------------------- */\n\n    var days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];\n    var months = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'];\n\n    // is a given dates day equal given day parameter?\n    is.day = function(date, day) {\n        return is.date(date) && day.toLowerCase() === days[date.getDay()];\n    };\n    // day method does not support 'all' and 'any' interfaces\n    is.day.api = ['not'];\n\n    // is a given date in daylight saving time?\n    is.dayLightSavingTime = function(date) {\n        var january = new Date(date.getFullYear(), 0, 1);\n        var july = new Date(date.getFullYear(), 6, 1);\n        var stdTimezoneOffset = Math.max(january.getTimezoneOffset(), july.getTimezoneOffset());\n        return date.getTimezoneOffset() < stdTimezoneOffset;\n    };\n\n    // is a given date future?\n    is.future = function(date) {\n        var now = new Date();\n        return is.date(date) && date.getTime() > now.getTime();\n    };\n\n    // is date within given range?\n    is.inDateRange = function(date, start, end) {\n        if (is.not.date(date) || is.not.date(start) || is.not.date(end)) {\n            return false;\n        }\n        var stamp = date.getTime();\n        return stamp > start.getTime() && stamp < end.getTime();\n    };\n    // inDateRange method does not support 'all' and 'any' interfaces\n    is.inDateRange.api = ['not'];\n\n    // is a given date in last month range?\n    is.inLastMonth = function(date) {\n        return is.inDateRange(date, new Date(new Date().setMonth(new Date().getMonth() - 1)), new Date());\n    };\n\n    // is a given date in last week range?\n    is.inLastWeek = function(date) {\n        return is.inDateRange(date, new Date(new Date().setDate(new Date().getDate() - 7)), new Date());\n    };\n\n    // is a given date in last year range?\n    is.inLastYear = function(date) {\n        return is.inDateRange(date, new Date(new Date().setFullYear(new Date().getFullYear() - 1)), new Date());\n    };\n\n    // is a given date in next month range?\n    is.inNextMonth = function(date) {\n        return is.inDateRange(date, new Date(), new Date(new Date().setMonth(new Date().getMonth() + 1)));\n    };\n\n    // is a given date in next week range?\n    is.inNextWeek = function(date) {\n        return is.inDateRange(date, new Date(), new Date(new Date().setDate(new Date().getDate() + 7)));\n    };\n\n    // is a given date in next year range?\n    is.inNextYear = function(date) {\n        return is.inDateRange(date, new Date(), new Date(new Date().setFullYear(new Date().getFullYear() + 1)));\n    };\n\n    // is the given year a leap year?\n    is.leapYear = function(year) {\n        return is.number(year) && ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0);\n    };\n\n    // is a given dates month equal given month parameter?\n    is.month = function(date, month) {\n        return is.date(date) && month.toLowerCase() === months[date.getMonth()];\n    };\n    // month method does not support 'all' and 'any' interfaces\n    is.month.api = ['not'];\n\n    // is a given date past?\n    is.past = function(date) {\n        var now = new Date();\n        return is.date(date) && date.getTime() < now.getTime();\n    };\n\n    // is a given date in the parameter quarter?\n    is.quarterOfYear = function(date, quarter) {\n        return is.date(date) && is.number(quarter) && quarter === Math.floor((date.getMonth() + 3) / 3);\n    };\n    // quarterOfYear method does not support 'all' and 'any' interfaces\n    is.quarterOfYear.api = ['not'];\n\n    // is a given date indicate today?\n    is.today = function(date) {\n        var now = new Date();\n        var todayString = now.toDateString();\n        return is.date(date) && date.toDateString() === todayString;\n    };\n\n    // is a given date indicate tomorrow?\n    is.tomorrow = function(date) {\n        var now = new Date();\n        var tomorrowString = new Date(now.setDate(now.getDate() + 1)).toDateString();\n        return is.date(date) && date.toDateString() === tomorrowString;\n    };\n\n    // is a given date weekend?\n    // 6: Saturday, 0: Sunday\n    is.weekend = function(date) {\n        return is.date(date) && (date.getDay() === 6 || date.getDay() === 0);\n    };\n\n    // is a given date weekday?\n    is.weekday = not(is.weekend);\n\n    // is a given dates year equal given year parameter?\n    is.year = function(date, year) {\n        return is.date(date) && is.number(year) && year === date.getFullYear();\n    };\n    // year method does not support 'all' and 'any' interfaces\n    is.year.api = ['not'];\n\n    // is a given date indicate yesterday?\n    is.yesterday = function(date) {\n        var now = new Date();\n        var yesterdayString = new Date(now.setDate(now.getDate() - 1)).toDateString();\n        return is.date(date) && date.toDateString() === yesterdayString;\n    };\n\n    // Environment checks\n    /* -------------------------------------------------------------------------- */\n\n    var freeGlobal = is.windowObject(typeof global == 'object' && global) && global;\n    var freeSelf = is.windowObject(typeof self == 'object' && self) && self;\n    var thisGlobal = is.windowObject(typeof this == 'object' && this) && this;\n    var root = freeGlobal || freeSelf || thisGlobal || Function('return this')();\n\n    var document = freeSelf && freeSelf.document;\n    var previousIs = root.is;\n\n    // store navigator properties to use later\n    var navigator = freeSelf && freeSelf.navigator;\n    var platform = (navigator && navigator.platform || '').toLowerCase();\n    var userAgent = (navigator && navigator.userAgent || '').toLowerCase();\n    var vendor = (navigator && navigator.vendor || '').toLowerCase();\n\n    // is current device android?\n    is.android = function() {\n        return /android/.test(userAgent);\n    };\n    // android method does not support 'all' and 'any' interfaces\n    is.android.api = ['not'];\n\n    // is current device android phone?\n    is.androidPhone = function() {\n        return /android/.test(userAgent) && /mobile/.test(userAgent);\n    };\n    // androidPhone method does not support 'all' and 'any' interfaces\n    is.androidPhone.api = ['not'];\n\n    // is current device android tablet?\n    is.androidTablet = function() {\n        return /android/.test(userAgent) && !/mobile/.test(userAgent);\n    };\n    // androidTablet method does not support 'all' and 'any' interfaces\n    is.androidTablet.api = ['not'];\n\n    // is current device blackberry?\n    is.blackberry = function() {\n        return /blackberry/.test(userAgent) || /bb10/.test(userAgent);\n    };\n    // blackberry method does not support 'all' and 'any' interfaces\n    is.blackberry.api = ['not'];\n\n    // is current browser chrome?\n    // parameter is optional\n    is.chrome = function(range) {\n        var match = /google inc/.test(vendor) ? userAgent.match(/(?:chrome|crios)\\/(\\d+)/) : null;\n        return match !== null && is.not.opera() && compareVersion(match[1], range);\n    };\n    // chrome method does not support 'all' and 'any' interfaces\n    is.chrome.api = ['not'];\n\n    // is current device desktop?\n    is.desktop = function() {\n        return is.not.mobile() && is.not.tablet();\n    };\n    // desktop method does not support 'all' and 'any' interfaces\n    is.desktop.api = ['not'];\n\n    // is current browser edge?\n    // parameter is optional\n    is.edge = function(range) {\n        var match = userAgent.match(/edge\\/(\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // edge method does not support 'all' and 'any' interfaces\n    is.edge.api = ['not'];\n\n    // is current browser firefox?\n    // parameter is optional\n    is.firefox = function(range) {\n        var match = userAgent.match(/(?:firefox|fxios)\\/(\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // firefox method does not support 'all' and 'any' interfaces\n    is.firefox.api = ['not'];\n\n    // is current browser internet explorer?\n    // parameter is optional\n    is.ie = function(range) {\n        var match = userAgent.match(/(?:msie |trident.+?; rv:)(\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // ie method does not support 'all' and 'any' interfaces\n    is.ie.api = ['not'];\n\n    // is current device ios?\n    is.ios = function() {\n        return is.iphone() || is.ipad() || is.ipod();\n    };\n    // ios method does not support 'all' and 'any' interfaces\n    is.ios.api = ['not'];\n\n    // is current device ipad?\n    // parameter is optional\n    is.ipad = function(range) {\n        var match = userAgent.match(/ipad.+?os (\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // ipad method does not support 'all' and 'any' interfaces\n    is.ipad.api = ['not'];\n\n    // is current device iphone?\n    // parameter is optional\n    is.iphone = function(range) {\n        // avoid false positive for Facebook in-app browser on ipad;\n        // original iphone doesn't have the OS portion of the UA\n        var match = is.ipad() ? null : userAgent.match(/iphone(?:.+?os (\\d+))?/);\n        return match !== null && compareVersion(match[1] || 1, range);\n    };\n    // iphone method does not support 'all' and 'any' interfaces\n    is.iphone.api = ['not'];\n\n    // is current device ipod?\n    // parameter is optional\n    is.ipod = function(range) {\n        var match = userAgent.match(/ipod.+?os (\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // ipod method does not support 'all' and 'any' interfaces\n    is.ipod.api = ['not'];\n\n    // is current operating system linux?\n    is.linux = function() {\n        return /linux/.test(platform) && is.not.android();\n    };\n    // linux method does not support 'all' and 'any' interfaces\n    is.linux.api = ['not'];\n\n    // is current operating system mac?\n    is.mac = function() {\n        return /mac/.test(platform);\n    };\n    // mac method does not support 'all' and 'any' interfaces\n    is.mac.api = ['not'];\n\n    // is current device mobile?\n    is.mobile = function() {\n        return is.iphone() || is.ipod() || is.androidPhone() || is.blackberry() || is.windowsPhone();\n    };\n    // mobile method does not support 'all' and 'any' interfaces\n    is.mobile.api = ['not'];\n\n    // is current state offline?\n    is.offline = not(is.online);\n    // offline method does not support 'all' and 'any' interfaces\n    is.offline.api = ['not'];\n\n    // is current state online?\n    is.online = function() {\n        return !navigator || navigator.onLine === true;\n    };\n    // online method does not support 'all' and 'any' interfaces\n    is.online.api = ['not'];\n\n    // is current browser opera?\n    // parameter is optional\n    is.opera = function(range) {\n        var match = userAgent.match(/(?:^opera.+?version|opr)\\/(\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // opera method does not support 'all' and 'any' interfaces\n    is.opera.api = ['not'];\n\n    // is current browser opera mini?\n    // parameter is optional\n    is.operaMini = function(range) {\n        var match = userAgent.match(/opera mini\\/(\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // operaMini method does not support 'all' and 'any' interfaces\n    is.operaMini.api = ['not'];\n\n    // is current browser phantomjs?\n    // parameter is optional\n    is.phantom = function(range) {\n        var match = userAgent.match(/phantomjs\\/(\\d+)/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // phantom method does not support 'all' and 'any' interfaces\n    is.phantom.api = ['not'];\n\n    // is current browser safari?\n    // parameter is optional\n    is.safari = function(range) {\n        var match = userAgent.match(/version\\/(\\d+).+?safari/);\n        return match !== null && compareVersion(match[1], range);\n    };\n    // safari method does not support 'all' and 'any' interfaces\n    is.safari.api = ['not'];\n\n    // is current device tablet?\n    is.tablet = function() {\n        return is.ipad() || is.androidTablet() || is.windowsTablet();\n    };\n    // tablet method does not support 'all' and 'any' interfaces\n    is.tablet.api = ['not'];\n\n    // is current device supports touch?\n    is.touchDevice = function() {\n        return !!document && ('ontouchstart' in freeSelf ||\n            ('DocumentTouch' in freeSelf && document instanceof DocumentTouch));\n    };\n    // touchDevice method does not support 'all' and 'any' interfaces\n    is.touchDevice.api = ['not'];\n\n    // is current operating system windows?\n    is.windows = function() {\n        return /win/.test(platform);\n    };\n    // windows method does not support 'all' and 'any' interfaces\n    is.windows.api = ['not'];\n\n    // is current device windows phone?\n    is.windowsPhone = function() {\n        return is.windows() && /phone/.test(userAgent);\n    };\n    // windowsPhone method does not support 'all' and 'any' interfaces\n    is.windowsPhone.api = ['not'];\n\n    // is current device windows tablet?\n    is.windowsTablet = function() {\n        return is.windows() && is.not.windowsPhone() && /touch/.test(userAgent);\n    };\n    // windowsTablet method does not support 'all' and 'any' interfaces\n    is.windowsTablet.api = ['not'];\n\n    // Object checks\n    /* -------------------------------------------------------------------------- */\n\n    // has a given object got parameterized count property?\n    is.propertyCount = function(object, count) {\n        if (is.not.object(object) || is.not.number(count)) {\n            return false;\n        }\n        var n = 0;\n        for (var property in object) {\n            if (hasOwnProperty.call(object, property) && ++n > count) {\n                return false;\n            }\n        }\n        return n === count;\n    };\n    // propertyCount method does not support 'all' and 'any' interfaces\n    is.propertyCount.api = ['not'];\n\n    // is given object has parameterized property?\n    is.propertyDefined = function(object, property) {\n        return is.object(object) && is.string(property) && property in object;\n    };\n    // propertyDefined method does not support 'all' and 'any' interfaces\n    is.propertyDefined.api = ['not'];\n\n    // is a given value thenable (like Promise)?\n    is.thenable = function(value) {\n        return is.object(value) && typeof value.then === 'function';\n    };\n\n    // Array checks\n    /* -------------------------------------------------------------------------- */\n\n    // is a given item in an array?\n    is.inArray = function(value, array) {\n        if (is.not.array(array)) {\n            return false;\n        }\n        for (var i = 0; i < array.length; i++) {\n            if (array[i] === value) {\n                return true;\n            }\n        }\n        return false;\n    };\n    // inArray method does not support 'all' and 'any' interfaces\n    is.inArray.api = ['not'];\n\n    // is a given array sorted?\n    is.sorted = function(array, sign) {\n        if (is.not.array(array)) {\n            return false;\n        }\n        var predicate = comparator[sign] || comparator['>='];\n        for (var i = 1; i < array.length; i++) {\n            if (!predicate(array[i], array[i - 1])) {\n                return false;\n            }\n        }\n        return true;\n    };\n\n\n    // API\n    // Set 'not', 'all' and 'any' interfaces to methods based on their api property\n    /* -------------------------------------------------------------------------- */\n\n    function setInterfaces() {\n        var options = is;\n        for (var option in options) {\n            if (hasOwnProperty.call(options, option) && is['function'](options[option])) {\n                var interfaces = options[option].api || ['not', 'all', 'any'];\n                for (var i = 0; i < interfaces.length; i++) {\n                    if (interfaces[i] === 'not') {\n                        is.not[option] = not(is[option]);\n                    }\n                    if (interfaces[i] === 'all') {\n                        is.all[option] = all(is[option]);\n                    }\n                    if (interfaces[i] === 'any') {\n                        is.any[option] = any(is[option]);\n                    }\n                }\n            }\n        }\n    }\n    setInterfaces();\n\n    // Configuration methods\n    // Intentionally added after setInterfaces function\n    /* -------------------------------------------------------------------------- */\n\n    // change namespace of library to prevent name collisions\n    // var preferredName = is.setNamespace();\n    // preferredName.odd(3);\n    // => true\n    is.setNamespace = function() {\n        root.is = previousIs;\n        return this;\n    };\n\n    // set optional regexes to methods\n    is.setRegexp = function(regexp, name) {\n        for (var r in regexes) {\n            if (hasOwnProperty.call(regexes, r) && (name === r)) {\n                regexes[r] = regexp;\n            }\n        }\n    };\n\n    return is;\n}));\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"is_js\",\n  \"version\": \"0.9.0\",\n  \"main\": \"is.js\",\n  \"license\": \"MIT\",\n  \"description\": \"micro check library\",\n  \"homepage\": \"http://is.js.org/\",\n  \"repository\": \"arasatasaygin/is.js\",\n  \"scripts\": {\n    \"build\": \"npm run lint && npm run min\",\n    \"lint\": \"eslint .\",\n    \"min\": \"uglifyjs is.js -m --comments \\\"/^!/\\\" -o is.min.js\",\n    \"test\": \"mocha --check-leaks -R dot\",\n    \"test:phantom\": \"mocha-phantomjs -R dot test/index.html\"\n  },\n  \"pre-commit\": [\n    \"lint\"\n  ],\n  \"devDependencies\": {\n    \"chai\": \"^3.4.0\",\n    \"eslint\": \"^2.13.1\",\n    \"lodash\": \"^4.15.0\",\n    \"mocha\": \"^2.2.1\",\n    \"mocha-phantomjs\": \"^4.1.0\",\n    \"pre-commit\": \"^1.1.3\",\n    \"uglify-js\": \"^2.7.3\"\n  },\n  \"files\": [\n    \"is.js\",\n    \"is.min.js\"\n  ]\n}\n"
  },
  {
    "path": "test/.eslintrc.js",
    "content": "module.exports = {\n    env: {\n        mocha: true\n    },\n    globals: {\n        is: false,\n        chai: false\n    }\n};\n"
  },
  {
    "path": "test/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <title>is.js tests</title>\n    <link rel=\"stylesheet\" media=\"all\" href=\"../node_modules/mocha/mocha.css\">\n</head>\n<body>\n    <div id=\"mocha\"></div>\n    <div id=\"messages\"></div>\n    <div id=\"fixtures\"></div>\n    <script src=\"../node_modules/lodash/lodash.js\"></script>\n    <script src=\"../node_modules/chai/chai.js\"></script>\n    <script src=\"../node_modules/mocha/mocha.js\"></script>\n    <script src=\"../is.js\"></script>\n    <script>mocha.setup('bdd')</script>\n    <script src=\"test.js\"></script>\n    <script>mocha.run()</script>\n</body>\n</html>\n"
  },
  {
    "path": "test/test.js",
    "content": ";(function(root) {    // eslint-disable-line no-extra-semi\n    var _ = root._ || require('lodash'),\n        document = root.document,\n        expect = _.get(root, 'chai.expect') || require('chai').expect,\n        is = root.is || require('../is'),\n        window = root.window;\n\n    function checkApi(name, list) {\n        list || (list = ['all', 'any', 'not']);\n        _.each(['all', 'any', 'not'], function(api) {\n            var exists = _.includes(list, api);\n            describe('is.' + api + '.' + name, function()  {\n                it('should ' + (exists ? '' : 'not ') + 'exist', function() {\n                    expect(is[api][name]).to[exists ? 'be': 'not'].exist;\n                });\n            });\n        });\n    }\n\n    describe('type checks', function() {\n        describe('is.arguments', function() {\n            it('should return true if passed parameter type is arguments', function() {\n                var getArguments = function() {\n                    return arguments;\n                };\n                var args = getArguments('test');\n                expect(is.arguments(args)).to.be.true;\n            });\n            it('should return false if passed parameter type is not arguments', function() {\n                var notArgs = ['test'];\n                expect(is.arguments(notArgs)).to.be.false;\n            });\n        });\n        checkApi('arguments');\n\n        describe('is.array', function() {\n            it('should return true if passed parameter type is array', function() {\n                var array = ['test'];\n                expect(is.array(array)).to.be.true;\n            });\n            it('should return false if passed parameter type is not array', function() {\n                var notArray = 'test';\n                expect(is.array(notArray)).to.be.false;\n            });\n        });\n        checkApi('array');\n\n        describe('is.boolean', function() {\n            it('should return true if passed parameter type is boolean', function() {\n                var bool = true;\n                expect(is.boolean(bool)).to.be.true;\n            });\n            it('should return false if passed parameter type is not boolean', function() {\n                var notBool = 'test';\n                expect(is.boolean(notBool)).to.be.false;\n            });\n        });\n        checkApi('boolean');\n\n        describe('is.date', function() {\n            it('should return true if passed parameter type is date', function() {\n                var date = new Date();\n                expect(is.date(date)).to.be.true;\n            });\n            it('should return false if passed parameter type is not date', function() {\n                var notDate = 'test';\n                expect(is.date(notDate)).to.be.false;\n            });\n        });\n        checkApi('date');\n\n        describe('is.error', function() {\n            it('should return true if passed parameter type is error', function() {\n                var error = new Error();\n                expect(is.error(error)).to.be.true;\n            });\n            it('should return false if passed parameter type is not error', function() {\n                var notError = 'test';\n                expect(is.error(notError)).to.be.false;\n            });\n        });\n        checkApi('error');\n\n        describe('is.function', function() {\n            it('should return true if passed parameter type is function', function() {\n                expect(is.function(is.function)).to.be.true;\n            });\n            it('should return false if passed parameter type is not function', function() {\n                var notFunction = 'test';\n                expect(is.function(notFunction)).to.be.false;\n            });\n        });\n        checkApi('function');\n\n        describe('is.nan', function() {\n            it('should return true if passed parameter type is NaN', function() {\n                expect(is.nan(NaN)).to.be.true;\n            });\n            it('should return false if passed parameter type is not NaN', function() {\n                var notNaN = 'test';\n                expect(is.nan(notNaN)).to.be.false;\n            });\n        });\n        checkApi('nan');\n\n        describe('is.null', function() {\n            it('should return true if passed parameter type is null', function() {\n                expect(is.null(null)).to.be.true;\n            });\n            it('should return false if passed parameter type is not null', function() {\n                var notNull = 'test';\n                expect(is.null(notNull)).to.be.false;\n            });\n        });\n        checkApi('null');\n\n        describe('is.number', function() {\n            it('should return true if passed parameter type is number', function() {\n                expect(is.number(1)).to.be.true;\n            });\n            it('should return false if passed parameter type is not number', function() {\n                var notNumber = 'test';\n                expect(is.number(notNumber)).to.be.false;\n            });\n            it('should return false if passed parameter is NaN', function() {\n                expect(is.number(NaN)).to.be.false;\n            })\n        });\n        checkApi('number');\n\n        describe('is.object', function() {\n            it('should return true if passed parameter type is object', function() {\n                expect(is.object({})).to.be.true;\n            });\n            it('should return false if passed parameter type is not object', function() {\n                var notObject = 'test';\n                expect(is.object(notObject)).to.be.false;\n            });\n        });\n        checkApi('object');\n\n        describe('is.json',function() {\n            it('should return true if passed parameter type is a json object', function() {\n                expect(is.json({})).to.be.true;\n            });\n            it('should return false if passed parameter type is not a json object', function() {\n                var notObject = 'test';\n                expect(is.json(notObject)).to.be.false;\n            });\n        });\n        checkApi('json');\n\n        describe('is.regexp', function() {\n            it('should return true if passed parameter type is regexp', function() {\n                var regexp = new RegExp();\n                expect(is.regexp(regexp)).to.be.true;\n            });\n            it('should return false if passed parameter type is not regexp', function() {\n                var notRegexp = 'test';\n                expect(is.regexp(notRegexp)).to.be.false;\n            });\n        });\n        checkApi('regexp');\n\n        describe('is.sameType', function() {\n            it('should return true if passed parameter types are same', function() {\n                expect(is.sameType(1, 2)).to.be.true;\n                expect(is.sameType('test', 'test')).to.be.true;\n            });\n            it('should return false if passed parameter types are not same', function() {\n                expect(is.sameType(1, 'test')).to.be.false;\n            });\n        });\n        checkApi('sameType', ['not']);\n\n        describe('is.char', function() {\n            it('should return true if passed parameter type is char', function() {\n                expect(is.char('t')).to.be.true;\n            });\n            it('should return false if passed parameter type is not a char', function() {\n                expect(is.char('test')).to.be.false;\n            });\n        });\n        checkApi('char');\n\n        describe('is.string', function() {\n            it('should return true if passed parameter type is string', function() {\n                expect(is.string('test')).to.be.true;\n            });\n            it('should return false if passed parameter type is not string', function() {\n                expect(is.string(1)).to.be.false;\n            });\n        });\n        checkApi('string');\n\n        describe('is.undefined', function() {\n            it('should return true if passed parameter type is undefined', function() {\n                expect(is.undefined(undefined)).to.be.true;\n            });\n            it('should return false if passed parameter type is not undefined', function() {\n                expect(is.undefined(null)).to.be.false;\n                expect(is.undefined('test')).to.be.false;\n            });\n        });\n        checkApi('undefined');\n    });\n\n    describe('presence checks', function() {\n        describe('is.empty', function() {\n            it('should return true if given array is empty', function() {\n                expect(is.empty([])).to.be.true;\n            });\n            it('should return false if given object is not empty', function() {\n                expect(is.empty({test: 'test'})).to.be.false;\n            });\n        });\n        checkApi('empty');\n\n        describe('is.existy', function() {\n            it('should return false if given value is null', function() {\n                expect(is.existy(null)).to.be.false;\n            });\n            it('should return false if given value is undefined', function() {\n                expect(is.existy(undefined)).to.be.false;\n            });\n            it('should return true if given value is not null or undefined', function() {\n                expect(is.existy('test')).to.be.true;\n            });\n        });\n        checkApi('existy');\n\n        describe('is.truthy', function() {\n            it('should return true if given value is truthy', function() {\n                expect(is.truthy('test')).to.be.true;\n            });\n            it('should return false if given value is not truthy', function() {\n                expect(is.truthy(undefined)).to.be.false;\n            });\n            it('should return false if given value is false', function() {\n                expect(is.truthy(false)).to.be.false;\n            });\n        });\n        checkApi('truthy');\n\n        describe('is.falsy', function() {\n            it('should return false if given value is truthy', function() {\n                expect(is.falsy('test')).to.be.false;\n            });\n            it('should return true if given value is falsy', function() {\n                expect(is.falsy(undefined)).to.be.true;\n            });\n            it('should return true if given value is false', function() {\n                expect(is.falsy(false)).to.be.true;\n            });\n        });\n        checkApi('falsy');\n\n        describe('is.space', function() {\n            it('should return false if given value is not string', function() {\n                expect(is.space(1)).to.be.false;\n            });\n            it('should return true if given value is space', function() {\n                expect(is.space(' ')).to.be.true;\n            });\n        });\n        checkApi('space');\n    });\n\n    describe('arithmetic checks', function() {\n        describe('is.equal', function() {\n            it('should return true if given two numbers are equal', function() {\n                expect(is.equal(3, 1 + 2)).to.be.true;\n            });\n            it('should return false if given two numbers are not equal', function() {\n                expect(is.equal(3, 2)).to.be.false;\n            });\n            it('should return true if given two strings are same', function() {\n                expect(is.equal('test', 'test')).to.be.true;\n            });\n            it('should return false if given two strings are not same', function() {\n                expect(is.equal('test', 'test2')).to.be.false;\n            });\n            it('should return true if given two boolean are same', function() {\n                expect(is.equal(false, false)).to.be.true;\n            });\n            it('should return false if given two boolean are not same', function() {\n                expect(is.equal(false, true)).to.be.false;\n            });\n        });\n        checkApi('equal', ['not']);\n\n        describe('is.even', function() {\n            it('should return true if given number is even', function() {\n                expect(is.even(2)).to.be.true;\n            });\n            it('should return false if given number is not even', function() {\n                expect(is.even(3)).to.be.false;\n            });\n            it('should return false if given number is not integer', function() {\n                expect(is.even(2.5)).to.be.false;\n            });\n        });\n        checkApi('even');\n\n        describe('is.odd', function() {\n            it('should return true if given number is odd', function() {\n                expect(is.odd(3)).to.be.true;\n            });\n            it('should return true if given number is negative odd', function() {\n                expect(is.odd(-3)).to.be.true;\n            });\n            it('should return false if given number is not odd', function() {\n                expect(is.odd(2)).to.be.false;\n            });\n            it('should return false if given number is not integer', function() {\n                expect(is.odd(2.5)).to.be.false;\n            });\n        });\n        checkApi('odd');\n\n        describe('is.positive', function() {\n            it('should return true if given number is positive', function() {\n                expect(is.positive(3)).to.be.true;\n            });\n            it('should return false if given number is not positive', function() {\n                expect(is.positive(-2)).to.be.false;\n            });\n        });\n        checkApi('positive');\n\n        describe('is.negative', function() {\n            it('should return true if given number is negative', function() {\n                expect(is.negative(-3)).to.be.true;\n            });\n            it('should return false if given number is not negative', function() {\n                expect(is.negative(2)).to.be.false;\n            });\n        });\n        checkApi('negative');\n\n        describe('is.above', function() {\n            it('should return true if given number is above minimum value', function() {\n                expect(is.above(13, 12)).to.be.true;\n            });\n            it('should return false if given number is not above minimum value', function() {\n                expect(is.above(12, 13)).to.be.false;\n            });\n        });\n        checkApi('above', ['not']);\n\n        describe('is.under', function() {\n            it('should return true if given number is under maximum value', function() {\n                expect(is.under(11, 12)).to.be.true;\n            });\n            it('should return false if given number is not under maximum value', function() {\n                expect(is.under(12, 11)).to.be.false;\n            });\n        });\n        checkApi('under', ['not']);\n\n        describe('is.within', function() {\n            it('should return true if given number is within minimum and maximum values', function() {\n                expect(is.within(10, 5, 15)).to.be.true;\n            });\n            it('should return false if given number is not within minimum and maximum values', function() {\n                expect(is.within(20, 5, 15)).to.be.false;\n            });\n        });\n        checkApi('within', ['not']);\n\n        describe('is.decimal', function() {\n            it('should return true if given number is decimal', function() {\n                expect(is.decimal(4.2)).to.be.true;\n            });\n            it('should return false if given number is not decimal', function() {\n                expect(is.decimal(2)).to.be.false;\n            });\n        });\n        checkApi('decimal');\n\n        describe('is.integer', function() {\n            it('should return true if given number is integer', function() {\n                expect(is.integer(4)).to.be.true;\n            });\n            it('should return false if given number is not integer', function() {\n                expect(is.integer(2.2)).to.be.false;\n            });\n        });\n        checkApi('integer');\n\n        describe('is.finite', function() {\n            it('should return true if given number is finite', function() {\n                expect(is.finite(4)).to.be.true;\n            });\n            it('should return false if given number is not finite', function() {\n                expect(is.finite(Infinity)).to.be.false;\n            });\n        });\n        checkApi('finite');\n\n        describe('is.infinite', function() {\n            it('should return true if given number is infinite', function() {\n                expect(is.infinite(Infinity)).to.be.true;\n            });\n            it('should return false if given number is not infinite', function() {\n                expect(is.infinite(1)).to.be.false;\n                expect(is.infinite(NaN)).to.be.false;\n            });\n        });\n        checkApi('infinite');\n    });\n\n    describe('regexp checks', function() {\n        describe('is.url', function() {\n            it('should return true if given value is url', function() {\n                expect(is.url('http://www.test.com')).to.be.true;\n            });\n            it('should return false if given value is not url', function() {\n                expect(is.url(1)).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.url(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.url(undefined)).to.be.false;\n            });\n        });\n        checkApi('url');\n\n        describe('is.email', function() {\n            it('should return true if given value is email', function() {\n                expect(is.email('test@test.com')).to.be.true;\n            });\n            it('should return false if given value is not email', function() {\n                expect(is.email('test@test')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.email(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.email(undefined)).to.be.false;\n            });\n        });\n        checkApi('email');\n\n        describe('is.creditCard', function() {\n            it('should return true if given value is credit card', function() {\n                expect(is.creditCard(378282246310005)).to.be.true;\n            });\n            it('should return false if given value is not credit card', function() {\n                expect(is.creditCard(123)).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.creditCard(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.creditCard(undefined)).to.be.false;\n            });\n        });\n        checkApi('creditCard');\n\n        describe('is.alphaNumeric', function() {\n            it('should return true if given value is alpha numeric', function() {\n                expect(is.alphaNumeric(123)).to.be.true;\n            });\n            it('should return false if given value is not alpha numeric', function() {\n                expect(is.alphaNumeric('*?')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.alphaNumeric(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.alphaNumeric(undefined)).to.be.false;\n            });\n        });\n        checkApi('alphaNumeric');\n\n        describe('is.timeString', function() {\n            it('should return true if given value is time string', function() {\n                expect(is.timeString('13:45:30')).to.be.true;\n            });\n            it('should return false if given value is not time string', function() {\n                expect(is.timeString('12:12:90')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.timeString(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.timeString(undefined)).to.be.false;\n            });\n        });\n        checkApi('timeString');\n\n        describe('is.dateString', function() {\n            it('should return true if given value is date string', function() {\n                expect(is.dateString('11/11/2011')).to.be.true;\n                expect(is.dateString('10-21-2012')).to.be.true;\n            });\n            it('should return false if given value is not date string', function() {\n                expect(is.dateString('1')).to.be.false;\n                expect(is.dateString('10/21-2012')).to.be.false;\n            });\n             it('should return false if the given value is null', function() {\n                expect(is.dateString(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.dateString(undefined)).to.be.false;\n            });\n        });\n        checkApi('dateString');\n\n        describe('is.usZipCode', function() {\n            it('should return true if given value is US zip code', function() {\n                expect(is.usZipCode('02201-1020')).to.be.true;\n            });\n            it('should return false if given value is not US zip code', function() {\n                expect(is.usZipCode('1')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.usZipCode(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.usZipCode(undefined)).to.be.false;\n            });\n        });\n        checkApi('usZipCode');\n\n        describe('is.caPostalCode', function() {\n            it('should return true if given value is Canada postal code', function() {\n                expect(is.caPostalCode('L8V3Y1')).to.be.true;\n            });\n            it('should return true if given value is Canada postal code with space', function() {\n                expect(is.caPostalCode('L8V 3Y1')).to.be.true;\n            });\n            it('should return false if given value is not Canada postal code', function() {\n                expect(is.caPostalCode('1')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.caPostalCode(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.caPostalCode(undefined)).to.be.false;\n            });\n        });\n        checkApi('caPostalCode');\n\n        describe('is.ukPostCode', function() {\n            it('should return true if given value is UK post code', function() {\n                expect(is.ukPostCode('B184BJ')).to.be.true;\n            });\n            it('should return false if given value is not UK post code', function() {\n                expect(is.ukPostCode('1')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.ukPostCode(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.ukPostCode(undefined)).to.be.false;\n            });\n        });\n        checkApi('ukPostCode');\n\n        describe('is.nanpPhone', function() {\n            it('should return true if given value is nanpPhone', function() {\n                expect(is.nanpPhone('609-555-0175')).to.be.true;\n            });\n            it('should return false if given value is not nanpPhone', function() {\n                expect(is.nanpPhone('1')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.nanpPhone(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.nanpPhone(undefined)).to.be.false;\n            });\n        });\n        checkApi('nanpPhone');\n\n        describe('is.eppPhone', function() {\n            it('should return true if given value is eppPhone', function() {\n                expect(is.eppPhone('+90.2322456789')).to.be.true;\n            });\n            it('should return false if given value is not eppPhone', function() {\n                expect(is.eppPhone('1')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.eppPhone(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.eppPhone(undefined)).to.be.false;\n            });\n        });\n        checkApi('eppPhone');\n\n        describe('is.socialSecurityNumber', function() {\n            it('should return true if given value is socialSecurityNumber', function() {\n                expect(is.socialSecurityNumber('017-90-7890')).to.be.true;\n                expect(is.socialSecurityNumber('017907890')).to.be.true;\n            });\n            it('should return false if given value is not socialSecurityNumber', function() {\n                expect(is.socialSecurityNumber('1')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.socialSecurityNumber(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.socialSecurityNumber(undefined)).to.be.false;\n            });\n        });\n        checkApi('socialSecurityNumber');\n\n        describe('is.affirmative', function() {\n            it('should return true if given value is affirmative', function() {\n                expect(is.affirmative('yes')).to.be.true;\n            });\n            it('should return false if given value is not affirmative', function() {\n                expect(is.affirmative('no')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.affirmative(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.affirmative(undefined)).to.be.false;\n            });\n        });\n        checkApi('affirmative');\n\n        describe('is.hexadecimal', function() {\n            it('should return true if given value is hexadecimal', function() {\n                expect(is.hexadecimal('ff')).to.be.true;\n                expect(is.hexadecimal('0xff')).to.be.true;\n            });\n            it('should return false if given value is not hexadecimal', function() {\n                expect(is.hexadecimal(0.287)).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.hexadecimal(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.hexadecimal(undefined)).to.be.false;\n            });\n        });\n        checkApi('hexadecimal');\n\n        describe('is.hexColor', function() {\n            it('should return true if given value is hexColor', function() {\n                expect(is.hexColor('#333')).to.be.true;\n            });\n            it('should return false if given value is not hexColor', function() {\n                expect(is.hexColor(0.287)).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.hexColor(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.hexColor(undefined)).to.be.false;\n            });\n        });\n        checkApi('hexColor');\n\n        describe('is.ip', function() {\n            it('should return true if given value is a valid IP address', function() {\n                expect(is.ip('2001:DB8:0:0:1::1')).to.be.true;\n            });\n            it('should return false if given value is not a valid IP address', function() {\n                expect(is.ip('985.12.3.4')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.ip(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.ip(undefined)).to.be.false;\n            });\n        });\n        checkApi('ip');\n\n        describe('is.ipv4', function() {\n            it('should return true if given value is a valid IPv4 address', function() {\n                expect(is.ipv4('198.12.3.142')).to.be.true;\n            });\n            it('should return false if given value is not a valid IPv4 address', function() {\n                expect(is.ipv4('985.12.3.4')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.ipv4(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.ipv4(undefined)).to.be.false;\n            });\n        });\n        checkApi('ipv4');\n\n        describe('is.ipv6', function() {\n            it('should return true if given value is a valid IPv6 address', function() {\n                expect(is.ipv6('2001:DB8:0:0:1::1')).to.be.true;\n            });\n            it('should return false if given value is not a valid IPv6 address', function() {\n                expect(is.ipv6('985.12.3.4')).to.be.false;\n            });\n            it('should return false if the given value is null', function() {\n                expect(is.ipv6(null)).to.be.false;\n            });\n            it('should return false if the given value is undefined', function() {\n                expect(is.ipv6(undefined)).to.be.false;\n            });\n        });\n        checkApi('ipv6');\n    });\n\n    describe('string checks', function() {\n        describe('is.include', function() {\n            it('should return true if given string contains substring', function() {\n                expect(is.include('test.com', 't.com')).to.be.true;\n            });\n            it('should return false if given string does not contain substring', function() {\n                expect(is.include('test.com', 'nope')).to.be.false;\n            });\n        });\n        checkApi('include', ['not']);\n\n        describe('is.upperCase', function() {\n            it('should return true if given string is uppercase', function() {\n                expect(is.upperCase('TEST')).to.be.true;\n            });\n            it('should return false if given string is not uppercase', function() {\n                expect(is.upperCase('test')).to.be.false;\n            });\n        });\n        checkApi('upperCase');\n\n        describe('is.lowerCase', function() {\n            it('should return true if given string is lowerCase', function() {\n                expect(is.lowerCase('test')).to.be.true;\n            });\n            it('should return false if given string is not lowerCase', function() {\n                expect(is.lowerCase('TEST')).to.be.false;\n            });\n        });\n        checkApi('lowerCase');\n\n        describe('is.startWith', function() {\n            it('should return true if given string starts with substring', function() {\n                expect(is.startWith('test', 'te')).to.be.true;\n            });\n            it('should return false if given string does not start with substring', function() {\n                expect(is.startWith('test', 'st')).to.be.false;\n            });\n        });\n        checkApi('startWith', ['not']);\n\n        describe('is.endWith', function() {\n            it('should return true if given string ends with substring', function() {\n                expect(is.endWith('test', 't')).to.be.true;\n                expect(is.endWith('test', 'st')).to.be.true;\n            });\n            it('should return false if given string does not end with substring', function() {\n                expect(is.endWith('test', 'te')).to.be.false;\n            });\n            it('should prevent true return if endWith is not present in the string', function() {\n                expect(is.endWith('id', '_id')).to.be.false;\n            });\n        });\n        checkApi('endWith', ['not']);\n\n        describe('is.capitalized', function() {\n            it('should return true if given string is capitalized', function() {\n                expect(is.capitalized('Test')).to.be.true;\n            });\n            it('should return false if given string is not capitalized', function() {\n                expect(is.capitalized('test')).to.be.false;\n            });\n            it('should return true if words are capitalized', function() {\n                expect(is.capitalized('Test Is Good')).to.be.true;\n                expect(is.capitalized('Test   Is   Good')).to.be.true;\n            });\n            it('should return false if words are not capitalized', function() {\n                expect(is.capitalized('Test is good')).to.be.false;\n            });\n        });\n        checkApi('capitalized');\n\n        describe('is.palindrome', function() {\n            it('should return true if given string is palindrome', function() {\n                expect(is.palindrome('abba')).to.be.true;\n                expect(is.palindrome('testset')).to.be.true;\n                expect(is.palindrome('A man, a plan, a canal - Panama!')).to.be.true;\n            });\n            it('should return false if given string is not palindrome', function() {\n                expect(is.palindrome('test')).to.be.false;\n            });\n        });\n        checkApi('palindrome');\n    });\n\n    describe('time checks', function() {\n        describe('is.today', function() {\n            it('should return true if given date is today', function() {\n                var date = new Date();\n                expect(is.today(date)).to.be.true;\n            });\n            it('should return false if given date is not today', function() {\n                var date = new Date();\n                expect(is.today(date.setDate(date.getDate() - 1))).to.be.false;\n            });\n        });\n        checkApi('today');\n\n        describe('is.yesterday', function() {\n            it('should return true if given date is yesterday', function() {\n                var date = new Date();\n                var yesterday = new Date(date.setDate(date.getDate() - 1));\n                expect(is.yesterday(yesterday)).to.be.true;\n            });\n            it('should return false if given date is not yesterday', function() {\n                var date = new Date();\n                expect(is.yesterday(date)).to.be.false;\n            });\n        });\n        checkApi('yesterday');\n\n        describe('is.tomorrow', function() {\n            it('should return true if given date is tomorrow', function() {\n                var date = new Date();\n                var tomorrow = new Date(date.setDate(date.getDate() + 1));\n                expect(is.tomorrow(tomorrow)).to.be.true;\n            });\n            it('should return false if given date is not tomorrow', function() {\n                var date = new Date();\n                expect(is.tomorrow(date)).to.be.false;\n            });\n        });\n        checkApi('tomorrow');\n\n        describe('is.past', function() {\n            it('should return true if given date is past', function() {\n                var date = new Date();\n                var past = new Date(date.setDate(date.getDate() - 1));\n                expect(is.past(past)).to.be.true;\n            });\n            it('should return false if given date is not past', function() {\n                var date = new Date();\n                expect(is.past(date)).to.be.false;\n            });\n        });\n        checkApi('past');\n\n        describe('is.future', function() {\n            it('should return true if given date is future', function() {\n                var date = new Date();\n                var future = new Date(date.setDate(date.getDate() + 1));\n                expect(is.future(future)).to.be.true;\n            });\n            it('should return false if given date is not future', function() {\n                var date = new Date();\n                var past = new Date(date.setDate(date.getDate() - 1));\n                expect(is.future(date)).to.be.false;\n                expect(is.future(past)).to.be.false;\n            });\n        });\n        checkApi('future');\n\n        describe('is.day', function() {\n            it('should return true if given day string is the day of the date object', function() {\n                var time = 1421572235303;\n                expect(is.day(new Date(time), 'sunday')).to.be.true;\n            });\n            it('should return false if given day string is not the day of the date object', function() {\n                var time = 1421572235303;\n                expect(is.day(new Date(time), 'monday')).to.be.false;\n            });\n        });\n        checkApi('day', ['not']);\n\n        describe('is.month', function() {\n            it('should return true if given month string is the month of the date object', function() {\n                var time = 1421572235303;\n                expect(is.month(new Date(time), 'january')).to.be.true;\n            });\n            it('should return false if given month string is not the month of the date object', function() {\n                var time = 1421572235303;\n                expect(is.month(new Date(time), 'february')).to.be.false;\n            });\n        });\n        checkApi('month', ['not']);\n\n        describe('is.year', function() {\n            it('should return true if given year string is the year of the date object', function() {\n                var time = 1421572235303;\n                expect(is.year(new Date(time), 2015)).to.be.true;\n            });\n            it('should return false if given year string is not the year of the date object', function() {\n                var time = 1421572235303;\n                expect(is.year(new Date(time), 2016)).to.be.false;\n            });\n        });\n        checkApi('year', ['not']);\n\n        describe('is.leapYear', function() {\n            it('should return true if given year is a leap year', function() {\n                expect(is.leapYear(2016)).to.be.true;\n            });\n            it('should return false if given year is not a leap year', function() {\n                expect(is.leapYear(2015)).to.be.false;\n            });\n        });\n        checkApi('leapYear');\n\n        describe('is.weekend', function() {\n            it('should return true if given date is weekend', function() {\n                var time = 1421572235303;\n                expect(is.weekend(new Date(time))).to.be.true;\n            });\n            it('should return false if given date is not weekend', function() {\n                var time = 1421572235303;\n                var date = new Date(time);\n                var friday = new Date(date.setDate(date.getDate() - 2));\n                expect(is.weekend(friday)).to.be.false;\n            });\n        });\n        checkApi('weekend');\n\n        describe('is.weekday', function() {\n            it('should return true if given date is weekday', function() {\n                var time = 1421572235303;\n                var date = new Date(time);\n                var friday = new Date(date.setDate(date.getDate() - 2));\n                expect(is.weekday(friday)).to.be.true;\n            });\n            it('should return false if given date is not weekday', function() {\n                var time = 1421572235303;\n                var sunday = new Date(time);\n                expect(is.weekday(sunday)).to.be.false;\n            });\n        });\n        checkApi('weekday');\n\n        describe('is.inDateRange', function() {\n            it('should return true if date is within given start date and end date', function() {\n                var today = new Date();\n                var date = new Date();\n                var tomorrow = new Date(date.setDate(date.getDate() + 1));\n                var yesterday = new Date(date.setDate(date.getDate() - 2));\n                expect(is.inDateRange(today, yesterday, tomorrow)).to.be.true;\n            });\n            it('should return false if date is not within given start date and end date', function() {\n                var today = new Date();\n                var date = new Date();\n                var tomorrow = new Date(date.setDate(date.getDate() + 1));\n                var yesterday = new Date(date.setDate(date.getDate() - 2));\n                expect(is.inDateRange(yesterday, today, tomorrow)).to.be.false;\n            });\n        });\n        checkApi('inDateRange', ['not']);\n\n        describe('is.inLastWeek', function() {\n            it('should return true if date is within last week', function() {\n                var date = new Date();\n                var twoDaysAgo = new Date(date.setDate(date.getDate() - 2));\n                expect(is.inLastWeek(twoDaysAgo)).to.be.true;\n            });\n            it('should return false if date is not within last week', function() {\n                var date = new Date();\n                var eightDaysAgo = new Date(date.setDate(date.getDate() - 8));\n                expect(is.inLastWeek(eightDaysAgo)).to.be.false;\n            });\n        });\n        checkApi('inLastWeek');\n\n        describe('is.inLastMonth', function() {\n            it('should return true if date is within last month', function() {\n                var date = new Date();\n                var tenDaysAgo = new Date(date.setDate(date.getDate() - 10));\n                expect(is.inLastMonth(tenDaysAgo)).to.be.true;\n            });\n            it('should return false if date is not within last month', function() {\n                var date = new Date();\n                var fiftyDaysAgo = new Date(date.setDate(date.getDate() - 50));\n                expect(is.inLastMonth(fiftyDaysAgo)).to.be.false;\n            });\n        });\n        checkApi('inLastMonth');\n\n        describe('is.inLastYear', function() {\n            it('should return true if date is within last year', function() {\n                var date = new Date();\n                var threeMonthsAgo = new Date(date.setMonth(date.getMonth() - 3));\n                expect(is.inLastYear(threeMonthsAgo)).to.be.true;\n            });\n            it('should return false if date is not within last year', function() {\n                var date = new Date();\n                var future = new Date(date.setDate(date.getDate() + 1));\n                expect(is.inLastYear(future)).to.be.false;\n            });\n        });\n        checkApi('inLastYear');\n\n        describe('is.inNextWeek', function() {\n            it('should return true if date is within next week', function() {\n                var date = new Date();\n                var future = new Date(date.setDate(date.getDate() + 1));\n                expect(is.inNextWeek(future)).to.be.true;\n            });\n            it('should return false if date is not within next week', function() {\n                var date = new Date();\n                var yesterday = new Date(date.setDate(date.getDate() - 1));\n                expect(is.inNextWeek(yesterday)).to.be.false;\n            });\n        });\n        checkApi('inNextWeek');\n\n        describe('is.inNextMonth', function() {\n            it('should return true if date is within next month', function() {\n                var date = new Date();\n                var aWeekLater = new Date(date.setDate(date.getDate() + 7));\n                expect(is.inNextMonth(aWeekLater)).to.be.true;\n            });\n            it('should return false if date is not within next month', function() {\n                var date = new Date();\n                var yesterday = new Date(date.setDate(date.getDate() - 1));\n                expect(is.inNextMonth(yesterday)).to.be.false;\n            });\n        });\n        checkApi('inNextMonth');\n\n        describe('is.inNextYear', function() {\n            it('should return true if date is within next year', function() {\n                var date = new Date();\n                var threeMonthsLater = new Date(date.setMonth(date.getMonth() + 3));\n                expect(is.inNextYear(threeMonthsLater)).to.be.true;\n            });\n            it('should return false if date is not within next year', function() {\n                var date = new Date();\n                var past = new Date(date.setDate(date.getDate() - 1));\n                expect(is.inNextYear(past)).to.be.false;\n            });\n        });\n        checkApi('inNextYear');\n\n        describe('is.quarterOfYear', function() {\n            it('should return true if given quarter is the quarter of the date object', function() {\n                var time = 1421572235303;\n                var date = new Date(time);\n                expect(is.quarterOfYear(date, 1)).to.be.true;\n            });\n            it('should return false if given quarter is not the quarter of the date object', function() {\n                var time = 1421572235303;\n                var date = new Date(time);\n                expect(is.quarterOfYear(date, 2)).to.be.false;\n            });\n        });\n        checkApi('quarterOfYear', ['not']);\n\n        describe('is.dayLightSavingTime', function() {\n            it('should return false if given date is not in daylight saving time', function() {\n                var time = 1421572235303;\n                var date = new Date(time);\n                expect(is.dayLightSavingTime(date)).to.be.false;\n            });\n            it('should return false if given date is in daylight saving time', function() {\n                var time = 1421572235303;\n                var date = new Date(time);\n                var sixMonthsAgo = new Date(date.setMonth(date.getMonth() - 6));\n                expect(is.dayLightSavingTime(sixMonthsAgo)).to.be.true;\n            });\n        });\n        checkApi('dayLightSavingTime');\n    });\n\n    describe('object checks', function() {\n        describe('is.propertyCount', function() {\n            it('should return true if given count matches that of the object', function() {\n                var obj = {\n                    test: 'test',\n                    is: 'is',\n                    good: 'good'\n                };\n                expect(is.propertyCount(obj, 3)).to.be.true;\n            });\n            it('should return false if given count does not match that of the object', function() {\n                var obj = {\n                    test: 'test',\n                    is: 'is'\n                };\n                expect(is.propertyCount(obj, 3)).to.be.false;\n            });\n        });\n        checkApi('propertyCount', ['not']);\n\n        describe('is.propertyDefined', function() {\n            it('should return true if given property is in objects', function() {\n                var obj = {\n                    test: 'test',\n                    is: 'is',\n                    good: 'good'\n                };\n                expect(is.propertyDefined(obj, 'good')).to.be.true;\n            });\n            it('should return false if given property is not in objects', function() {\n                var obj = {\n                    test: 'test',\n                    is: 'is'\n                };\n                expect(is.propertyDefined(obj, 'good')).to.be.false;\n            });\n        });\n        checkApi('propertyDefined', ['not']);\n\n        describe('is.windowObject', function() {\n            it('should return true if given object is window object', function() {\n                expect(is.windowObject(window)).to.be[!!window];\n            });\n            it('should return false if given object is not window object', function() {\n                expect(is.windowObject({})).to.be.false;\n            });\n        });\n        checkApi('windowObject');\n\n        describe('is.domNode', function() {\n            it('should return true if given object is a DOM node', function() {\n                var obj = document && document.createElement('div');\n                expect(is.domNode(obj)).to.be[!!document];\n            });\n            it('should return false if given object is not a DOM node', function() {\n                expect(is.domNode({})).to.be.false;\n            });\n        });\n        checkApi('domNode');\n\n        describe('is.thenable', function() {\n            it('should return true if passed parameter type is Promise', function() {\n                var promise = Promise.resolve(true); // eslint-disable-line no-undef\n                expect(is.thenable(promise)).to.be.true;\n            });\n            it('should return false if passed parameter type is not Promise', function() {\n                var notPromise = 'test';\n                expect(is.thenable(notPromise)).to.be.false;\n            });\n        });\n        checkApi('thenable');\n    });\n\n    describe('array checks', function() {\n        describe('is.sorted', function() {\n            it('should return true if given array is sorted', function() {\n                var array1 = [1, 2, 3, 4, 5];\n                expect(is.sorted(array1)).to.be.true;\n                expect(is.sorted(array1, '>=')).to.be.true;\n                expect(is.sorted(array1, '>')).to.be.true;\n                expect(is.sorted(array1, '<=')).to.be.false;\n                expect(is.sorted(array1, '<')).to.be.false;\n\n                var array2 = [5, 4, 4, 3, 1];\n                expect(is.sorted(array2)).to.be.false;\n                expect(is.sorted(array2, '>=')).to.be.false;\n                expect(is.sorted(array2, '>')).to.be.false;\n                expect(is.sorted(array2, '<=')).to.be.true;\n                expect(is.sorted(array2, '<')).to.be.false;\n\n                var array3 = [10];\n                expect(is.sorted(array3)).to.be.true;\n                expect(is.sorted(array3, '>=')).to.be.true;\n                expect(is.sorted(array3, '>')).to.be.true;\n                expect(is.sorted(array3, '<=')).to.be.true;\n                expect(is.sorted(array3, '<')).to.be.true;\n            });\n            it('should return false if given array is not sorted', function() {\n                var array = [1, 2, 3, 5, 4];\n                expect(is.sorted(array)).to.be.false;\n                expect(is.sorted(array, '>=')).to.be.false;\n                expect(is.sorted(array, '>')).to.be.false;\n                expect(is.sorted(array, '<=')).to.be.false;\n                expect(is.sorted(array, '<')).to.be.false;\n            });\n        });\n        checkApi('sorted');\n\n        describe('is.inArray', function()  {\n            it('should return true if the item is in the array', function() {\n                var value = 3;\n                var array = [1, 4, 6, 7, 3];\n                expect(is.inArray(value, array)).to.be.true;\n            });\n            it('should return false if the item is not in the array', function() {\n                var value = 2;\n                var array = [1, 4, 6, 7, 3];\n                expect(is.inArray(value, array)).to.be.false;\n            });\n        });\n        checkApi('inArray', ['not']);\n    });\n\n}(this));\n"
  }
]