Opinionated, tree-shakeable TypeScript libraries for building web apps fast, published under the @knitkode npm scope.
| Package | Version | Description |
|---|---|---|
@knitkode/utils |
Type guards, object and array helpers, case conversion, URL and cookie helpers | |
@knitkode/dom |
Selectors, event delegation, scroll and resize listeners, measurements | |
@knitkode/browser |
URL search and hash navigation, storage clients, gtag, device detection | |
@knitkode/react |
Hooks and components, a headless calendar and form antispam | |
@knitkode/api |
Type-safe API client with optional SWR hooks and Next.js helpers | |
@knitkode/node |
File system helpers, dependency version lookup, SWC transforms |
Install only the packages you need:
pnpm add @knitkode/utils
# or: npm install @knitkode/utilsImport from the package root, or from a module subpath to load just that module:
import { debounce, slugify } from "@knitkode/utils";
import { isFullString } from "@knitkode/utils/isFullString";Every package lists its entry points in its own README, and the API reference documents every function and type.
- ES modules only. Bundlers need no configuration. Node.js can
importthe packages, andrequire()them from 20.19 / 22.12. - TypeScript (types are included): use
"moduleResolution": "bundler","node16"or"nodenext". @knitkode/noderequires Node.js 22 or later.
kit intends to stay on its current major version: no breaking changes, deprecations instead (see the versioning policy). All @knitkode/* packages share one version number and follow semantic versioning: @knitkode/react@3.2.0 is meant to be used with @knitkode/utils@3.2.0. Every package has its own CHANGELOG.md, and each release is listed on the GitHub releases page. Releases are published from CI with npm provenance.
Each pull request also gets installable preview builds from pkg.pr.new, linked in a PR comment.
These packages were published as @koine/* up to 2.0.0-beta.217. Internationalization has moved to the separate Koine project. See the migration guide.
See CONTRIBUTING.md for the development setup and RELEASING.md for how releases work.
MIT © Alessandro Sansottera (KnitKode)