0.2.0
Utilities for string transformation, published on JSR.
First of all, you need to install the package:
npx jsr add @dmnchzl/stringify
Equivalent with Yarn
yarn dlx jsr add @dmnchzl/stringify
Equivalent with pNPM
pnpm dlx jsr add @dmnchzl/stringify
Equivalent with Deno
deno add @dmnchzl/stringify
Equivalent with Bun
bunx jsr add @dmnchzl/stringify
Below, the list of all available utilities:
toCamelCase
Set case of a string to 'camelCase'
import { toCamelCase } from '@dmnchzl/stringify';
console.log(toCamelCase('Hello World')); // helloWorldtoKebabCase
Set case of a string to 'kebab-case'
import { toKebabCase } from '@dmnchzl/stringify';
console.log(toKebabCase('Hello World')); // hello-worldtoPascalCase
Set case of a string to 'PascalCase'
import { toPascalCase } from '@dmnchzl/stringify';
console.log(toPascalCase('Hello World')); // HelloWorldtoSnakeCase
Set case of a string to 'snake_case'
import { toSnakeCase } from '@dmnchzl/stringify';
console.log(toSnakeCase('Hello World')); // hello_worldgetWords
Extract words from string
import { getWords } from '@dmnchzl/stringify';
console.log(getWords('Hello World')); // ['Hello', 'World']countWords
Count words from string
import { countWords } from '@dmnchzl/stringify';
console.log(countWords('Hello World')); // 2 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2024 Damien Chazoule <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.