radiant-bloom-utils
v1.0.3
Published
Utility functions for handling data in JavaScript
Downloads
15
Readme
radiant-bloom-utils
A collection of utility functions for string manipulation in JavaScript.
Installation
You can install the radiant-bloom-utils
library via npm:
npm install radiant-bloom-utils
Usage
const utils = require('radiant-bloom-utils');
console.log(utils.capitalizeString('hello')); // Output: 'Hello'
console.log(utils.reverseString('hello')); // Output: 'olleh'
console.log(utils.isPalindrome('radar')); // Output: true
console.log(utils.toCamelCase('hello world')); // Output: 'helloWorld'
console.log(utils.generateRandomString(8)); // Output: '2h9p5AqZ'
console.log(utils.trimAndLowercase(' Hello World ')); // Output: 'hello world'
Functions
capitalizeString(str)
: Capitalizes the first character of a string.reverseString(str)
: Reverses a string.isPalindrome(str)
: Checks if a string is a palindrome.toCamelCase(str)
: Converts a string to camelCase.generateRandomString(length)
: Generates a random string of a specified length.trimAndLowercase(str)
: Trims whitespace and converts a string to lowercase.
License
This project is licensed under the MIT License - see the LICENSE file for details.