{"id":36921807,"url":"https://github.com/vedanshshetti/tstoolset","last_synced_at":"2026-01-15T03:17:51.184Z","repository":{"id":331958115,"uuid":"1131346155","full_name":"vedanshshetti/tstoolset","owner":"vedanshshetti","description":"Collection of handy TypeScript types, ranging from primitives like numbers all the way to UUIDs and Email Addresses. ","archived":false,"fork":false,"pushed_at":"2026-01-11T20:04:10.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T20:29:18.602Z","etag":null,"topics":["ts","type-library","types","typesafety","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vedanshshetti.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-09T21:19:53.000Z","updated_at":"2026-01-11T20:04:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vedanshshetti/tstoolset","commit_stats":null,"previous_names":["vedanshshetti/tstoolset"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/vedanshshetti/tstoolset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedanshshetti%2Ftstoolset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedanshshetti%2Ftstoolset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedanshshetti%2Ftstoolset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedanshshetti%2Ftstoolset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vedanshshetti","download_url":"https://codeload.github.com/vedanshshetti/tstoolset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedanshshetti%2Ftstoolset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ts","type-library","types","typesafety","typescript","typescript-library"],"created_at":"2026-01-12T16:21:27.559Z","updated_at":"2026-01-15T03:17:51.179Z","avatar_url":"https://github.com/vedanshshetti.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧰 **tstoolset**\n\n**Open-source**, **Zero‑runtime** TypeScript **utility types** for cleaner, safer, more expressive code. \u003cbr\u003e\n![npm version](https://img.shields.io/npm/v/@insanedev2478/tstoolset)\n![license](https://img.shields.io/github/license/vedanshshetti/tstoolset)\n\n---\n\n## 🚀 Installation\n\n```sh\nnpm install @insanelabs/tstoolset\n```\n\n---\n\n## ✨ Features\n\n- Strong, readable primitive aliases (`String`, `Number`, `Boolean`, etc.)\n- Utility containers (`Obj\u003cT\u003e`, `Arr\u003cT\u003e`, `Func\u003cT\u003e`)\n- Template‑literal types (`UUIDV4`, `TrustableEmail`)\n- Nominal typing with `Brand\u003cT, Name\u003e`\n- Exact object enforcement with `Exact\u003cT\u003e`\n- Safe assertion helper: `convert\u003cT\u003e(x)`\n- Zero runtime cost — pure TypeScript\n- Object schema merger with `Merge\u003cA, B\u003e`\n- snake_case to camelCase conversion with `CamelCase\u003cstring\u003e`\n\n---\n\n## 📦 Usage\n\n### **Primitive \u0026 container helpers**\n\n```ts\nimport type { String, Obj, Arr } from \"@insanedev2478/tstoolset\";\n\ntype User = Obj\u003cString\u003e;\ntype Tags = Arr\u003cString\u003e;\n```\n\n### **Exact object enforcement**\n\n```ts\nimport type { Exact } from \"@insanedev2478/tstoolset\";\n\ntype User = { id: string };\nconst u: Exact\u003cUser\u003e = { id: \"123\" }; // ok\nconst x: Exact\u003cUser\u003e = { id: \"123\", a: 1 }; // ❌ extra key\n```\n\n### snake_case to camelCase 🔁\n\n```ts\nimport type { CamelCase } from \"@insanedev2478/tstoolset\";\nimport { convertToCamelCase } from \"@insanedev2478/tstoolset\";\n\n// Type-level examples:\ntype A = CamelCase\u003c\"snake_case\"\u003e; // 'snakeCase'\ntype B = CamelCase\u003c\"multi_part_name\"\u003e; // 'multiPartName'\ntype C = CamelCase\u003c\"alreadyCamel\"\u003e; // 'alreadyCamel'\n\n// Using a literal (type-level):\nconst s = \"hello_world\" as const;\ntype S = CamelCase\u003ctypeof s\u003e; // 'helloWorld'\n\n// Runtime helper `convertToCamelCase` preserves the typed relationship when used with literal types\nconst r = convertToCamelCase(s); // 'helloWorld' (type: CamelCase\u003ctypeof s\u003e)\n\n// It also handles dashes and spaces, and collapses multiple separators:\nconst r2 = convertToCamelCase(\"multi-part name\" as const); // 'multiPartName'\nconst r3 = convertToCamelCase(\"alreadyCamel\" as const); // 'alreadyCamel'\n```\n\n### **Nominal typing**\n\n```ts\nimport type { Brand } from \"@insanedev2478/tstoolset\";\n\ntype UserId = Brand\u003cstring, \"UserId\"\u003e;\n\nconst id: UserId = \"abc\" as UserId;\n```\n\n### **Merge**\n\n```ts\nimport type { Merge } from \"@insanedev2478/tstoolset\";\ntype A = { id: string; name: string };\ntype B = { id: number; admin: boolean };\n\nconst merged: Merge\u003cA, B\u003e = {\n  id: 123, // overridden by B\n  name: \"John\",\n  admin: true,\n};\n```\n\n### **UUID \u0026 Email template types**\n\n```ts\nimport type { UUIDV4, TrustableEmail } from \"@insanedev2478/tstoolset\";\n\nconst id: UUIDV4 = \"550e8400-e29b-41d4-a716-446655440000\";\nconst email: TrustableEmail = \"user@gmail.com\";\n```\n\n### **Safe converter**\n\n```ts\nimport { convert } from \"@insanedev2478/tstoolset\";\n\nconst fn = convert\u003c(...args: any[]) =\u003e void\u003e(() =\u003e {});\n```\n\n---\n\n## 🗺️ Roadmap\n\n- Deep utilities (`DeepPartial`, `DeepReadonly`, `DeepRequired`)\n- JSON‑safe types (`JsonValue`, `JsonObject`)\n- String manipulation types (`KebabCase`, `snake-case`)\n- Schema‑style helpers\n- More branded primitives\n\n---\n\n## 🤝 Contributing\n\nI am still a 6th grader, so new releases will only be on weekends, but \u003cbr\u003e\nissues, ideas, and PRs are welcome — this project is growing fast and feedback helps shape the toolkit.\n\n---\n\n## 📄 License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedanshshetti%2Ftstoolset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvedanshshetti%2Ftstoolset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedanshshetti%2Ftstoolset/lists"}