{"_id":"@se-oss/typeof","_rev":"2-c822909cca1fc3131a8f39bac83bfb8c","name":"@se-oss/typeof","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@se-oss/typeof","version":"1.0.0","keywords":["typeof","kind-of","type","check","typescript"],"author":{"url":"https://github.com/shahradelahi","name":"Shahrad Elahi","email":"shahrad@litehex.com"},"license":"MIT","_id":"@se-oss/typeof@1.0.0","maintainers":[{"name":"shahradelahi","email":"shahrad@litehex.com"}],"homepage":"https://github.com/shahradelahi/ts-typeof","bugs":{"url":"https://github.com/shahradelahi/ts-typeof/issues"},"dist":{"shasum":"83322f873523dc832ef78e9684d983b389b076c2","tarball":"https://registry.npmjs.org/@se-oss/typeof/-/typeof-1.0.0.tgz","fileCount":6,"integrity":"sha512-FinM5/Q3O6SSPXsCYwRDOFCrBO/NUDz0Loum5NAK3Rswk/Bj1B92MjnD9fIT9ibqdRj/pdb3q7rjGPY+B3eYOg==","signatures":[{"sig":"MEQCIBeWuGmNG+Nc1ujXpLjoB0hDlJP09sYaLcHnf6RTq4MqAiABiIF4tFAXBEN+xJIxDODjmCbpYSPwSaYV6AhrlzeQeQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@se-oss%2ftypeof@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16201},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":"./dist/index.js","default":"./dist/index.cjs"}},"gitHead":"bfec1b0a59301c39a20ff7f9939eaaa990d30c64","scripts":{"dev":"tsup --watch","lint":"pnpm typecheck && eslint .","test":"vitest --run","build":"pnpm typecheck && tsup","clean":"git clean -dfx **/node_modules/** dist .tsbuildinfo","format":"prettier --write .","lint:fix":"eslint --fix .","typecheck":"tsc --noEmit","format:check":"prettier --check .","prepublishOnly":"pnpm build && pnpm lint && pnpm format:check && pnpm test"},"_npmUser":{"name":"shahradelahi","email":"shahrad@litehex.com"},"prettier":"@shahrad/prettier-config","repository":{"url":"git+https://github.com/shahradelahi/ts-typeof.git","type":"git"},"_npmVersion":"10.9.4","description":"A robust utility for determining the runtime type of any JavaScript value.","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"packageManager":"pnpm@10.26.2+sha512.0e308ff2005fc7410366f154f625f6631ab2b16b1d2e70238444dd6ae9d630a8482d92a451144debc492416896ed16f7b114a86ec68b8404b2443869e68ffda6","devDependencies":{"tsup":"^8.5.1","eslint":"^9.39.2","vitest":"^4.0.16","globals":"^16.5.0","prettier":"^3.7.4","typescript":"^5.9.3","@types/node":"^25.0.3","@shahrad/tsconfig":"^1.2.0","@shahrad/eslint-config":"^1.0.1","@shahrad/prettier-config":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/typeof_1.0.0_1766751246075_0.6891811645081243","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@se-oss/typeof","version":"1.1.0","description":"A robust utility for determining the runtime type of any JavaScript value.","keywords":["typeof","kind-of","type","check","typescript"],"homepage":"https://github.com/shahradelahi/ts-typeof","repository":{"type":"git","url":"git+https://github.com/shahradelahi/ts-typeof.git"},"license":"MIT","author":{"name":"Shahrad Elahi","email":"shahrad@litehex.com","url":"https://github.com/shahradelahi"},"type":"module","exports":{".":{"import":"./dist/index.js","default":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"pnpm typecheck && tsup","clean":"git clean -dfx **/node_modules/** dist .tsbuildinfo","dev":"tsup --watch","format":"prettier --write .","format:check":"prettier --check .","lint":"pnpm typecheck && eslint .","lint:fix":"eslint --fix .","prepublishOnly":"pnpm build && pnpm lint && pnpm format:check && pnpm test","test":"vitest --run","typecheck":"tsc --noEmit"},"prettier":"@shahrad/prettier-config","devDependencies":{"@shahrad/eslint-config":"^1.0.1","@shahrad/prettier-config":"^1.2.2","@shahrad/tsconfig":"^1.2.0","@types/node":"^25.0.3","eslint":"^9.39.2","globals":"^16.5.0","prettier":"^3.7.4","tsup":"^8.5.1","typescript":"^5.9.3","vitest":"^4.0.16"},"packageManager":"pnpm@10.26.2+sha512.0e308ff2005fc7410366f154f625f6631ab2b16b1d2e70238444dd6ae9d630a8482d92a451144debc492416896ed16f7b114a86ec68b8404b2443869e68ffda6","_id":"@se-oss/typeof@1.1.0","gitHead":"8b25ef00d9b2d255c4fd47df2a45af4025d53e16","bugs":{"url":"https://github.com/shahradelahi/ts-typeof/issues"},"_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-sETzBzEzGgw1I1F6y04dp9G4MFcSEviC7zxD1aI0xGtCtugKWjCbDA9fb4E65pz9Qb6b1mX2fWfGi9tG4fzA0A==","shasum":"de81c5ce01066e3113ebcd27eb228e99a3d01fa0","tarball":"https://registry.npmjs.org/@se-oss/typeof/-/typeof-1.1.0.tgz","fileCount":6,"unpackedSize":17238,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@se-oss%2ftypeof@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA/2ViLpLyBJuhwhYB4Cgrl35oLLiTotKt7DtDL3hca1AiByMfLzRxri7n4LxhIxnrAFfSHvssppEznA05sNHGJ9dA=="}]},"_npmUser":{"name":"shahradelahi","email":"shahrad@litehex.com"},"directories":{},"maintainers":[{"name":"shahradelahi","email":"shahrad@litehex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/typeof_1.1.0_1767784282696_0.9011450858389882"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-26T12:14:06.018Z","modified":"2026-01-07T11:11:23.301Z","1.0.0":"2025-12-26T12:14:06.199Z","1.1.0":"2026-01-07T11:11:22.861Z"},"bugs":{"url":"https://github.com/shahradelahi/ts-typeof/issues"},"author":{"name":"Shahrad Elahi","email":"shahrad@litehex.com","url":"https://github.com/shahradelahi"},"license":"MIT","homepage":"https://github.com/shahradelahi/ts-typeof","keywords":["typeof","kind-of","type","check","typescript"],"repository":{"type":"git","url":"git+https://github.com/shahradelahi/ts-typeof.git"},"description":"A robust utility for determining the runtime type of any JavaScript value.","maintainers":[{"name":"shahradelahi","email":"shahrad@litehex.com"}],"readme":"# @se-oss/typeof\n\n[![CI](https://github.com/shahradelahi/ts-typeof/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/ts-typeof/actions/workflows/ci.yml)\n[![NPM Version](https://img.shields.io/npm/v/@se-oss/typeof.svg)](https://www.npmjs.com/package/@se-oss/typeof)\n[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/typeof)\n[![Install Size](https://packagephobia.com/badge?p=@se-oss/typeof)](https://packagephobia.com/result?p=@se-oss/typeof)\n\n_@se-oss/typeof_ is a robust utility for determining the runtime type of any JavaScript value.\n\n---\n\n- [Installation](#-installation)\n- [Usage](#-usage)\n- [Documentation](#-documentation)\n- [Contributing](#-contributing)\n- [License](#license)\n\n## 📦 Installation\n\n```bash\nnpm install @se-oss/typeof\n```\n\n<details>\n<summary>Install using your favorite package manager</summary>\n\n**pnpm**\n\n```bash\npnpm install @se-oss/typeof\n```\n\n**yarn**\n\n```bash\nyarn add @se-oss/typeof\n```\n\n</details>\n\n## 📖 Usage\n\n### Basic Usage\n\n```typescript\nimport { typeOf } from '@se-oss/typeof';\n\ntypeOf(undefined); // 'undefined'\ntypeOf(null); // 'null'\ntypeOf(true); // 'boolean'\ntypeOf('hello'); // 'string'\ntypeOf(123); // 'number'\ntypeOf([]); // 'array'\ntypeOf({}); // 'object'\ntypeOf(new Date()); // 'date'\ntypeOf(/abc/); // 'regexp'\n```\n\n### TypeScript Support\n\nThe library provides a `TypeOf<T>` conditional type that maps TypeScript types to their runtime string representations.\n\n```typescript\nimport type { TypeOf } from '@se-oss/typeof';\n\ntype MyType = TypeOf<string>; // 'string'\ntype MyDate = TypeOf<Date>; // 'date'\n```\n\nThe `typeOf` function also utilizes this type for better return type inference:\n\n```typescript\nconst result = typeOf('hello'); // Inferred as 'string'\n```\n\n## 📚 Documentation\n\nFor all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/typeof).\n\n## 🤝 Contributing\n\nWant to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-typeof).\n\nThanks again for your support, it is much appreciated! 🙏\n\n## License\n\n[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-typeof/graphs/contributors).\n","readmeFilename":"README.md"}