string-utils

๐Ÿงถ Ultra-minimal utilities for manipulating strings

MIT License

Stars
1

๐Ÿงถ string-utils

โญ Usage

Add the dependency from NPM:

npm install PROJECT-NAME

Import the utility you require and use it:

import { capitalize } from "PROJECT-NAME";

const title = capitalize("hello, world!");
console.log(title); // Hello, world!

The following utilities are available:

Utility Source
slugify("Hello world") โ†’ hello-world utils/slugify.ts
trim("-hello-", "-") โ†’ hello utils/trim.ts
capitalize("hello") โ†’ Hello utils/case.ts
camelCase("hello world") โ†’ helloWorld utils/case.ts
kebabCase("hello world") โ†’ hello-world utils/case.ts
snakeCase("hello world") โ†’ hello_world utils/case.ts

๐Ÿ› ๏ธ Development

Install dependencies:

yarn

Compile Typescript to ES6 before publishing to NPM:

yarn build

๐Ÿ“ License

MIT ยฉ Anand Chowdhary