{"id":40205533,"url":"https://github.com/jasonkuhrt/kitz","last_synced_at":"2026-06-12T06:31:20.886Z","repository":{"id":292899800,"uuid":"980868439","full_name":"jasonkuhrt/kitz","owner":"jasonkuhrt","description":"Opinionated Standard Lib for TypeScript ","archived":false,"fork":false,"pushed_at":"2026-06-10T18:57:41.000Z","size":30942,"stargazers_count":5,"open_issues_count":83,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-10T19:17:59.802Z","etag":null,"topics":["functional-programming","standard-library","type-safe","typescript","utilities"],"latest_commit_sha":null,"homepage":"https://wollybeard-kit.netlify.app/","language":"TypeScript","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/jasonkuhrt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-05-09T21:24:09.000Z","updated_at":"2026-06-10T19:02:41.000Z","dependencies_parsed_at":"2025-05-12T18:43:34.766Z","dependency_job_id":"7702bb2c-f47a-410c-a288-b6a231b3e77c","html_url":"https://github.com/jasonkuhrt/kitz","commit_stats":null,"previous_names":["jasonkuhrt/kit"],"tags_count":145,"template":false,"template_full_name":null,"purl":"pkg:github/jasonkuhrt/kitz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Fkitz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Fkitz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Fkitz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Fkitz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonkuhrt","download_url":"https://codeload.github.com/jasonkuhrt/kitz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonkuhrt%2Fkitz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34232789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["functional-programming","standard-library","type-safe","typescript","utilities"],"created_at":"2026-01-19T20:36:28.415Z","updated_at":"2026-06-12T06:31:20.880Z","avatar_url":"https://github.com/jasonkuhrt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kitz\n\nA TypeScript standard library.\n\n## About\n\n- Accumulated value across various utility functions across various projects over years.\n- Work in progress, breaking changes daily/weekly.\n\n## Goals\n\n- Maximum type safety\n- Maximum tree shakability\n- Maximum inline JSDoc\n- Functional interface\n- High performance (close to native as practical)\n- Organized by data structure with consistent base interfaces (e.g. `Arr.is`, `Obj.is`, `Str.is`, ...)\n\n## Documentation\n\nFor now read the code, things are very self contained.\nI will focus on JSDoc before writing here.\n\n## Installation\n\n```sh\n# Main package (includes all modules)\nbun add kitz\n\n# Or install individual packages\nbun add @kitz/core\nbun add @kitz/fs\nbun add @kitz/cli\nbun add @kitz/yaml\n# ... etc\n```\n\n## Package Organization\n\nEach regular scoped package can be imported as a namespace or barrel:\n\n```ts\nimport { X } from '@kitz/x'\nimport * as X from '@kitz/x/__'\n```\n\nThere are two non-regular special pacakges. The scoped core package and the unscoped metapackage.\n\nThe scoped core package has multiple modules and each can be imported as a namespace or barrel:\n\n```ts\nimport { A, B, C /* ... */ } from '@kitz/core'\nimport * as A from '@kitz/core/a'\nimport * as B from '@kitz/core/b'\nimport * as C from '@kitz/core/c'\n```\n\nThe metapackage re-exports all modules from all packages. The regular package re-exports the consumption pattern is:\n\n```ts\nimport { X } from 'kitz'\nimport * as X from 'kitz/x'\n```\n\nFor re-export of the special core package the consumption pattern is:\n\n```ts\nimport { A, B, C /* ... */ } from 'kitz'\nimport * as A from 'kitz/a'\nimport * as B from 'kitz/b'\nimport * as C from 'kitz/c'\n```\n\nNotice that the core package has been flattened into the metapackage.\n\n1. Its main entrypoint is a barrel of all scoped package main entrypoint exports (one namespace) and all core package main entrypoint exports (multiple namespaes).\n2. Its additional entrypoints are one per scoped package (their barrel entrypoint) and one per scsoped core package's own additional entrypoints.\n\nYou will also find these conventions:\n\n- Regular scoped packages: The exported namespace is pascal case of the package name (kebab case).\n- Core scoped package: The exported namespaces are pascal case of each entrypoint name (kebaba case).\n\n## Package Index\n\n\u003c!-- PACKAGES_TABLE_START --\u003e\n\n| Package                                               | Description                        |\n| ----------------------------------------------------- | ---------------------------------- |\n| [`@kitz/assert`](./packages/assert)                   | Assertion utilities                |\n| [`@kitz/bldr`](./packages/bldr)                       | Builder pattern utilities          |\n| [`@kitz/cli`](./packages/cli)                         | CLI framework                      |\n| [`@kitz/color`](./packages/color)                     | Color manipulation utilities       |\n| [`@kitz/config-manager`](./packages/config-manager)   | Configuration file management      |\n| [`@kitz/configurator`](./packages/configurator)       | Configurator pattern utilities     |\n| [`@kitz/core`](./packages/core)                       | Core data structures and utilities |\n| [`@kitz/env`](./packages/env)                         | Environment variable utilities     |\n| [`@kitz/fs`](./packages/fs)                           | Filesystem utilities               |\n| [`@kitz/group`](./packages/group)                     | Grouping utilities                 |\n| [`@kitz/html`](./packages/html)                       | HTML utilities                     |\n| [`@kitz/http`](./packages/http)                       | HTTP utilities                     |\n| [`@kitz/idx`](./packages/idx)                         | Index data structure               |\n| [`@kitz/json`](./packages/json)                       | JSON utilities                     |\n| [`@kitz/jsonc`](./packages/jsonc)                     | JSON with comments utilities       |\n| [`kitz`](./packages/kitz)                             | A TypeScript standard library      |\n| [`@kitz/log`](./packages/log)                         | Logging utilities                  |\n| [`@kitz/manifest`](./packages/manifest)               | Manifest file utilities            |\n| [`@kitz/mask`](./packages/mask)                       | Data masking utilities             |\n| [`@kitz/mod`](./packages/mod)                         | Module utilities                   |\n| [`@kitz/name`](./packages/name)                       | Naming convention utilities        |\n| [`@kitz/num`](./packages/num)                         | Extended number utilities          |\n| [`@kitz/oak`](./packages/oak)                         | CLI argument parsing               |\n| [`@kitz/otel`](./packages/otel)                       | OpenTelemetry trace utilities      |\n| [`@kitz/package-manager`](./packages/package-manager) | Package manager utilities          |\n| [`@kitz/paka`](./packages/paka)                       | Package utilities                  |\n| [`@kitz/prox`](./packages/prox)                       | Extended proxy utilities           |\n| [`@kitz/ref`](./packages/ref)                         | Reference utilities                |\n| [`@kitz/resource`](./packages/resource)               | Resource management utilities      |\n| [`@kitz/sch`](./packages/sch)                         | Schema utilities                   |\n| [`@kitz/semver`](./packages/semver)                   | Semantic versioning utilities      |\n| [`@kitz/syn`](./packages/syn)                         | Syntax utilities                   |\n| [`@kitz/test`](./packages/test)                       | Testing utilities                  |\n| [`@kitz/tex`](./packages/tex)                         | Text and box formatting utilities  |\n| [`@kitz/tree`](./packages/tree)                       | Tree data structure utilities      |\n| [`@kitz/url`](./packages/url)                         | URL utilities                      |\n| [`@kitz/ware`](./packages/ware)                       | Middleware utilities               |\n| [`@kitz/yaml`](./packages/yaml)                       | YAML codecs and resources          |\n\n\u003c!-- PACKAGES_TABLE_END --\u003e\n\n## Core Package Namespace Index\n\n\u003c!-- CORE_NAMESPACE_INDEX_START --\u003e\n\n| Module      | Description                                                                 |\n| ----------- | --------------------------------------------------------------------------- |\n| `Arr`       | Array utilities for working with readonly and mutable arrays.               |\n| `Bool`      | Boolean utilities for logical operations and predicates.                    |\n| `Err`       | Error handling utilities for robust error management.                       |\n| `Fn`        | Function utilities for functional programming patterns.                     |\n| `Lang`      | Language utilities for type inspection and formatting.                      |\n| `Null`      | Null utilities for nullable type handling.                                  |\n| `Num`       | Number utilities for numeric operations and type guards.                    |\n| `Obj`       | Object utilities for working with plain JavaScript objects.                 |\n| `Optic`     | Optic utilities for type-safe data access and transformation.               |\n| `Pat`       | Pattern matching utilities for declarative value matching.                  |\n| `Prom`      | Promise utilities for asynchronous operations.                              |\n| `Prox`      | Proxy utilities for dynamic object behavior.                                |\n| `Rec`       | Record utilities for working with plain JavaScript objects as dictionaries. |\n| `Str`       | String utilities for text manipulation and analysis.                        |\n| `Ts`        | TypeScript type utilities and type-level programming helpers.               |\n| `Tup`       | Tuple utilities for fixed-length array operations.                          |\n| `Undefined` | Undefined utilities for optional type handling.                             |\n\n\u003c!-- CORE_NAMESPACE_INDEX_END --\u003e\n\n## Global Settings\n\nKitz provides extensible global namespaces that you can augment via TypeScript declaration merging. This allows you to customize library behavior and extend type-level features for your project.\n\n### How to Extend\n\nCreate a `.d.ts` file in your project (e.g., `types/kitz-settings.d.ts`) and augment the global namespace:\n\n```typescript\n// types/kitz-settings.d.ts\ndeclare global {\n  namespace KITZ {\n    // Your augmentations here\n  }\n}\nexport {}\n```\n\n### `KITZ`\n\nLibrary configuration settings.\n\n#### `KITZ.Assert`\n\nType assertion behavior settings.\n\n| Setting                      | Type      | Default | Description                                       |\n| ---------------------------- | --------- | ------- | ------------------------------------------------- |\n| `lintBidForExactPossibility` | `boolean` | `false` | Error when `bid` is used where `exact` would work |\n| `showDiff`                   | `boolean` | `false` | Show detailed diff in type assertion errors       |\n\n```typescript\ndeclare global {\n  namespace KITZ {\n    interface Assert {\n      showDiff: true\n    }\n  }\n}\n```\n\n#### `KITZ.Perf.Settings`\n\nPerformance trade-off settings for type-level operations.\n\n| Setting     | Type      | Default | Description                                                 |\n| ----------- | --------- | ------- | ----------------------------------------------------------- |\n| `allowSlow` | `boolean` | `false` | Enable slow type operations (e.g., `Str.Length` \u003e 20 chars) |\n| `depth`     | `number`  | `10`    | Default depth for `Simplify.Auto` recursion                 |\n\n```typescript\ndeclare global {\n  namespace KITZ {\n    namespace Perf {\n      interface Settings {\n        allowSlow: true\n        depth: 5\n      }\n    }\n  }\n}\n```\n\n#### `KITZ.Simplify.Traversables`\n\nRegister custom container types for `Simplify` traversal.\n\n```typescript\nimport type { Effect } from 'effect'\nimport type { Kind, Simplify } from 'kitz'\n\ninterface EffectTraverser extends Kind.Kind {\n  return: this['parameters'] extends [infer $T, infer $DN, infer $SN]\n    ? $T extends Effect.Effect\u003cinfer S, infer E, infer R\u003e\n      ? Effect.Effect\u003cSimplify.To\u003c$DN, S, $SN\u003e, Simplify.To\u003c$DN, E, $SN\u003e, Simplify.To\u003c$DN, R, $SN\u003e\u003e\n      : never\n    : never\n}\n\ndeclare global {\n  namespace KITZ {\n    namespace Simplify {\n      interface Traversables {\n        _effect: {\n          extends: Effect.Effect\u003cany, any, any\u003e\n          traverse: EffectTraverser\n        }\n      }\n    }\n  }\n}\n```\n\n#### `KITZ.Ts.PreserveTypes`\n\nTypes to preserve during simplification (not expanded in IDE hovers).\n\n```typescript\nimport type { MyBrandedType } from './my-types'\n\ndeclare global {\n  namespace KITZ {\n    namespace Ts {\n      interface PreserveTypes {\n        _myBrand: MyBrandedType\n      }\n    }\n  }\n}\n```\n\n#### `KITZ.Ts.Error`\n\nError rendering settings.\n\n| Setting          | Type      | Default | Description                                             |\n| ---------------- | --------- | ------- | ------------------------------------------------------- |\n| `errorKeyLength` | `number`  | `14`    | Min key length for error alignment (underscore padding) |\n| `renderErrors`   | `boolean` | `true`  | Show full error object vs. message string only          |\n\n### `KITZ.Traits.Display`\n\nType-level string representation trait. Add custom display handlers for your types.\n\n```typescript\nimport type { Effect } from 'effect'\nimport type { Ts } from 'kitz'\n\ndeclare global {\n  namespace KITZ.Traits.Display {\n    interface Handlers\u003c$Type\u003e {\n      _effect: $Type extends Effect.Effect\u003cinfer A, infer E, infer R\u003e\n        ? `Effect\u003c${Ts.Display\u003cA\u003e}, ${Ts.Display\u003cE\u003e}, ${Ts.Display\u003cR\u003e}\u003e`\n        : never\n    }\n  }\n}\n```\n\nBuilt-in handlers include: `Array`, `ReadonlyArray`, `Promise`, `Date`, `RegExp`, `Function`, `symbol`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonkuhrt%2Fkitz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonkuhrt%2Fkitz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonkuhrt%2Fkitz/lists"}