Installation
You can install @rcpthongta/string-utils using your package manager of choice:
bash
npm install @rcpthongta/string-utilsbash
pnpm add @rcpthongta/string-utilsbash
yarn add @rcpthongta/string-utilsbash
bun add @rcpthongta/string-utilsRequirements
- Node.js:
>= 22 - TypeScript:
>= 5.0(Optional, recommended for type safety)
CDN / Direct Browser Usage
If you are not using a build tool, you can load the library directly via CDN:
html
<script src="https://cdn.jsdelivr.net/npm/@rcpthongta/string-utils/dist/iife/index.global.js"></script>
<script>
const { capitalize, camelCase, slugify } = window.stringUtils;
console.log(capitalize("hello world"));
// => "Hello world"
</script>html
<script src="https://unpkg.com/@rcpthongta/string-utils/dist/iife/index.global.js"></script>
<script>
const { capitalize, camelCase, slugify } = window.stringUtils;
console.log(capitalize("hello world"));
// => "Hello world"
</script>