The Swiss Army knife for string operations. 115+ methods, 4 API styles, TypeScript-first, with full i18n support. Zero dependencies.
npm install @oxog/strkit
Comprehensive string toolkit with all the methods you'll ever need.
camelCase, kebab-case, snake_case, PascalCase, Title Case and more.
Email, URL, UUID, IP, credit card, and 15+ more validators.
Trim, pad, wrap, truncate, reverse, replace, and more.
Levenshtein, Dice, Jaro-Winkler, Hamming, and fuzzy matching.
Character, word, and line diffs with unified patch support.
Template, sprintf, mask, currency, and number formatting.
Choose the style that fits your codebase. All styles work with the same methods.
import { str } from '@oxog/strkit';
str.case.camel('hello world');
str.validate.email('a@b.com');
str.manipulation.truncate(text, 100);
import { S } from '@oxog/strkit';
S(' hello world ')
.trim()
.camelCase()
.truncate(10).value;
import { camelCase, isEmail } from '@oxog/strkit';
camelCase('hello world');
isEmail('user@example.com');
import { registerPlugin } from '@oxog/strkit';
registerPlugin({
name: 'my-plugin',
methods: { custom: () => ... }
});
Get started in seconds. No configuration needed.