````markdown # String Helpers
npm install @appshare/bob2```markdownString Helpers
String transformation helpers such as casing converters, slug generation, truncation, and padding utilities.
`bash`
npm install @appshare/bob2
`javascript
import {
camelCase,
titleCase,
slugify,
truncate,
} from '@appshare/bob2/src/back.js';
const slug = slugify('Café Con Leche!');
console.log(slug); // "cafe-con-leche"
const camel = camelCase('make this camel case');
console.log(camel); // "makeThisCamelCase"
const heading = titleCase('the rise of string helpers', {
minorWords: ['of'],
});
console.log(heading); // "The Rise of String Helpers"
const preview = truncate('The quick brown fox jumps over the lazy dog', 20, {
wholeWords: true,
});
console.log(preview); // "The quick brown..."
`
- capitalize(value) – Capitalize the first character and lower-case the remainder.titleCase(value, options?)
- – Title case a string with optional minor words and casing options.camelCase(value)
- – Convert to lower camelCase.pascalCase(value)
- – Convert to UpperCamelCase.snakeCase(value)
- – Convert to lower snake_case.kebabCase(value)
- – Convert to lower kebab-case.slugify(value, options?)
- – Produce URL-safe slugs with configurable separators.truncate(value, maxLength, options?)
- – Truncate text with optional word boundaries and omission markers.pad(value, targetLength, options?)
- – Pad text to a target length across start, end, or both sides.```