{"id":18645155,"url":"https://github.com/danigb/hi-typeof","last_synced_at":"2025-11-05T03:30:25.209Z","repository":{"id":57263956,"uuid":"61300362","full_name":"danigb/hi-typeof","owner":"danigb","description":"Generate isStr, isNum and other typeof functions","archived":false,"fork":false,"pushed_at":"2016-06-16T17:40:17.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T13:05:10.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danigb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-16T14:24:15.000Z","updated_at":"2016-06-16T17:36:17.000Z","dependencies_parsed_at":"2022-08-25T02:20:52.436Z","dependency_job_id":null,"html_url":"https://github.com/danigb/hi-typeof","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fhi-typeof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fhi-typeof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fhi-typeof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fhi-typeof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danigb","download_url":"https://codeload.github.com/danigb/hi-typeof/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449547,"owners_count":19640532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-11-07T06:14:52.085Z","updated_at":"2025-11-05T03:30:25.176Z","avatar_url":"https://github.com/danigb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hi-typeof [![npm](https://img.shields.io/npm/v/hi-typeof.svg?style=flat-square)](https://www.npmjs.com/package/hi-typeof)\n\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![license](https://img.shields.io/npm/l/hi-typeof.svg?style=flat-square)](https://www.npmjs.com/package/hi-typeof)\n\nSome sugar to the javascript `typeof` operator. Generate isStr, isNum and other typeof functions.\n\n## Usage\n\n```js\nvar is = require('hi-typeof')\n\nvar isStr =  is('string')\nisStr('a string here') // =\u003e true\n\nvar isNum = is('number')\nisNum(16) // =\u003e true\nisNum('16') // =\u003e false\n\nvar isFn = is('function')\nisFn(isFn) // =\u003e true\n\n// Create inverse test\nvar isDef = is('undefined', false)\nisDef(isDef) // =\u003e true\nisDef(isDef.currentTime) // =\u003e false\n```\n\nBasically, it's a function I use a lot and just makes the code clear and concise. It does not add any extra functionallity to the `typeof` operator.\n\n## Source\n\nThis is the smallest module I've published (sorry for the npm package pollution), so here is the full source code:\n\n```js\nmodule.exports = function (t, r) {\n  var b = r === false\n  return function (o) { return (typeof o === t) !== b }\n}\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Fhi-typeof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanigb%2Fhi-typeof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Fhi-typeof/lists"}