string-utils

🧶 Ultra-minimal utilities for manipulating strings

View the Project on GitHub AnandChowdhary/string-utils

🧶 string-utils

Travis CI Coverage Status GitHub Vulnerabilities

⭐ 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