{"id":15604482,"url":"https://github.com/mohnish/is","last_synced_at":"2026-01-20T07:01:47.274Z","repository":{"id":19328196,"uuid":"22566707","full_name":"mohnish/is","owner":"mohnish","description":"A tiny component to detect a variable type. Node/Browser","archived":false,"fork":false,"pushed_at":"2015-10-02T21:24:21.000Z","size":196,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-14T16:50:31.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/is.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohnish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-03T03:53:23.000Z","updated_at":"2025-01-20T00:59:47.000Z","dependencies_parsed_at":"2022-07-13T01:20:31.067Z","dependency_job_id":null,"html_url":"https://github.com/mohnish/is","commit_stats":null,"previous_names":["mohnish/is.js"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mohnish/is","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnish%2Fis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnish%2Fis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnish%2Fis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnish%2Fis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohnish","download_url":"https://codeload.github.com/mohnish/is/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnish%2Fis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T03:41:33.863Z","updated_at":"2026-01-20T07:01:47.258Z","avatar_url":"https://github.com/mohnish.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Is.js\n\nA tiny component to detect the type of a variable.\n\n[![Build Status](https://travis-ci.org/mohnish/is.js.svg?branch=master)](https://travis-ci.org/mohnish/is.js)\n[![Code Climate](https://codeclimate.com/github/mohnish/is.js/badges/gpa.svg)](https://codeclimate.com/github/mohnish/is.js)\n\n## Installation\n\n- Node `npm install is.js`\n- Browser TODO\n\n## Usage\n\nNode\n\n```js\nvar is = require('is.js');\n```\n\nBrowser\n\n### TODO\n\n## API\n\n### new is(variable)\n\n```js\nvar foo = new is('MT');\n```\n\nor\n\n```js\nvar foo = is(1); // skip the new keyword\n```\n\n### is.type\n\n```js\nvar foo = is([]);\nfoo.type\n// =\u003e 'Array'\n```\n\n### is#isArray()\n\n```js\nvar foo = is([]);\nfoo.isArray()\n// =\u003e true\n```\n\n### is#isObject()\n\n```js\nvar foo = is({});\nfoo.isObject()\n// =\u003e true\n```\n\n### is#isNumber()\n\n```js\nvar foo = is(1);\nfoo.isNumber()\n// =\u003e true\nfoo.isArray()\n// =\u003e false\n```\n\n### is#isString()\n```\nvar foo = is(\"MT\");\nfoo.isString()\n// =\u003e true\n```\n\n### is#isUndefined()\n\n```js\nvar foo = is(undefined);\nfoo.isUndefined()\n// =\u003e true\n```\n\n### is#isNull()\n\n```js\nvar foo = is(null);\nfoo.isNull()\n// =\u003e true\n```\n\n### is#isFunction()\n\n```js\nvar foo = is(function() { return true; });\nfoo.isFunction()\n// =\u003e true\n```\n\n### is#isBoolean()\n\n```js\nvar foo = is(true);\nfoo.isBoolean()\n// =\u003e true\n```\n\n### is#isDate()\n\n```js\nvar foo = is(new Date);\nfoo.isDate()\n// =\u003e true\n```\n\n### is#isRegExp()\n\n```js\nvar foo = is(/MT/);\nfoo.isRegExp()\n// =\u003e true\n```\n\n### Running tests\n\n- First run `npm install`\n- Then, run `make`\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2015 Mohnish Thallavajhula \u0026lt;i@mohni.sh\u0026gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohnish%2Fis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohnish%2Fis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohnish%2Fis/lists"}