A simple string utility library for common string transformations.
npm install ztk-request
const { camelCase, capitalize, truncate } = require('ztk-request');
console.log(camelCase('hello_world')); // Output: helloWorld console.log(capitalize('world')); // Output: World console.log(truncate('This is a long text', 10)); // Output: This is a...
Converts a string from snake_case or kebab-case to camelCase.
Capitalizes the first character of a string.
Truncates a string to a specified maximum length and appends an ellipsis.
MIT