@mlaursen/utils
v0.0.2
Published
A package of utils I generally find myself using in projects
Maintainers
Readme
@mlaursen/utils
A package of utils I generally find myself using in projects.
Installation
npm install @mlaursen/utilscamelCase
Simple Example
import { camelCase } from "@mlaursen/utils";
camelCase("hello-world"); // "helloWorld"kebabCase
Simple Example
import { kebabCase } from "@mlaursen/utils";
kebabCase("HelloWorld"); // "hello-world"pascalCase
Simple Example
import { pascalCase } from "@mlaursen/utils";
pascalCase("hello-world"); // "HelloWorld"titleCase
Simple Example
import { titleCase } from "@mlaursen/utils";
titleCase("hello-world"); // "Hello World"upperFirst
Simple Example
import { upperFirst } from "@mlaursen/utils";
upperFirst("hello-world"); // "Hello-world"wait
Wait some duration
import { wait } from "@mlaursen/utils/wait";
console.log("start");
await wait(5000);
console.log("it has been five seconds");