@colakit/capitalize
is designed to be simple and straightforward, similar to the _.capitalize
function in lodash, but as a standalone module with no dependencies, making it perfect for projects where you want to keep your bundle size small.
To install @colakit/capitalize
, use npm or yarn:
npm install @colakit/capitalize
# OR
yarn add @colakit/capitalize
Import @colakit/capitalize
into your project and use it:
const capitalize = require("@colakit/capitalize");
// Example string
const myString = "FRED";
// Call function
const result = capitalize(myString);
// Output: 'Fred'
console.log(result);