A small TypeScript support toolkit for strings, numbers, dates, HTTP, and common utilities.
<img src="./public/image/logo.png" alt="Project logo" height="400" style={} />
@cynerad/support is a collection of small, focused helpers for everyday TypeScript work: string formatting, number helpers, dates, HTTP fetch client, cookies, file system helpers, and more.
camel, snake, kebab, slug, trim, between, after, before, mask, pad, uuid, and more.src/support/number).dayjs (see src/support/date).createFetchClient wrapper with typed responses and basic error handling.# Install from npm
npx shadcn@latest add https://cynerad.github.io/support/public/r/support.json
# install from pnpm
pnpm dlx shadcn@latest add https://cynerad.github.io/support/public/r/support.json
# install from yarn
yarn shadcn@latest add https://cynerad.github.io/support/public/r/support.json
# install from bun
bun x shadcn@latest add https://cynerad.github.io/support/public/r/support.json
import { camel, slug } from "@cynerad/support/string";
import { createFetchClient } from "@cynerad/support/fetch";
// String helpers
camel("hello_world"); // -> "helloWorld"
slug("Hello World!!!"); // -> "hello-world"
// HTTP client
const api = createFetchClient({
baseUrl: "https://api.example.com",
headers: { Authorization: "Bearer token" },
});
const users = await api.get<{ id: number; name: string }[]>("/users");
More usage examples live in the docs: example.com/docs.
This package uses Vitest.
# Run tests (uses "vitest run" under the hood)
pnpm test
# Run Vitest in watch/dev mode
pnpm dev
Scripts (from package.json):
pnpm dev – run Vitest in watch mode.pnpm test – run the full Vitest test suite once.pnpm lint and pnpm test.By contributing, you agree that your contributions will be licensed under the same MIT License as this project.