{"id":25774483,"url":"https://github.com/nicolaeiotu/xtypeof","last_synced_at":"2026-02-09T14:32:01.104Z","repository":{"id":40432371,"uuid":"309289850","full_name":"NicolaeIotu/xtypeof","owner":"NicolaeIotu","description":"xtypeof is extended typeof","archived":false,"fork":false,"pushed_at":"2024-12-05T13:19:40.000Z","size":524,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-05T15:22:32.726Z","etag":null,"topics":["typeof","types","xtypeof","xtypes"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicolaeIotu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-02T07:26:08.000Z","updated_at":"2024-12-05T13:19:44.000Z","dependencies_parsed_at":"2024-12-03T21:34:35.641Z","dependency_job_id":null,"html_url":"https://github.com/NicolaeIotu/xtypeof","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":"0.43243243243243246","last_synced_commit":"0a7ae4490a34ab48946d2b19da109de2712ab49c"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolaeIotu%2Fxtypeof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolaeIotu%2Fxtypeof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolaeIotu%2Fxtypeof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolaeIotu%2Fxtypeof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicolaeIotu","download_url":"https://codeload.github.com/NicolaeIotu/xtypeof/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240983701,"owners_count":19888741,"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":["typeof","types","xtypeof","xtypes"],"created_at":"2025-02-27T05:30:07.666Z","updated_at":"2026-02-09T14:32:01.075Z","avatar_url":"https://github.com/NicolaeIotu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Actions Status](https://github.com/NicolaeIotu/xtypeof/workflows/CI/badge.svg)\n\n# xtypeof\n\n**xtypeof** is extended typeof.\n\nThis simple single function lightweight module has zero dependencies and runs in all environments.\n\n**xtypeof** function takes a single parameter which can be anything and returns a lowercase string representing \nthe extended type of object passed including builtins and all other types available \nin the environment.\n\nBy value returns include \"undefined\", \"null\", \"boolean\", \"number\", \"bigint\", \"string\", \"symbol\", \"function\", \"object\",\n\"array\", \"map\", \"set\", \"date\", \"regexp\", \"weakmap\", \"weakset\", \"promise\", \"arraybuffer\", \"sharedarraybuffer\",\n\"dataview\", \"int8array\", \"uint8array\", \"uint8clampedarray\", \"int16array\", \"uint16array\", \"int32array\", \"uint32array\", \n\"float32array\", \"float64array\", \"bigint64array\", \"biguint64array\", \"error\" and all other environment specific extended \nlowercase types such as \"htmldivelement\" a.m.o.\n\n```\nimport xtypeof from 'xtypeof'\n\nconsole.log(xtypeof([])) // 'array'\nconsole.log(xtypeof('a')) // 'string'\nconsole.log(xtypeof(null)) // 'null'\nconsole.log(xtypeof(BigInt(123))) // 'bigint'\nconsole.log(xtypeof(Buffer.alloc(5))) // 'uint8array'\nconsole.log(xtypeof(new Error('err'))) // 'error'\nconsole.log(xtypeof(new RangeError('oor'))) // 'error'\n```\n\n\nInspired by [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#Examples](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#Examples)\n\nThere is an exception with Proxy which is not a regular type and will be recognized as 'object'. This is done for\n efficiency.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaeiotu%2Fxtypeof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolaeiotu%2Fxtypeof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaeiotu%2Fxtypeof/lists"}