azmelerto
v1.0.0
Published
Create a collection of utility functions that can be used across different projects. This could include functions for working with arrays, strings, dates, and other common data types.
Downloads
2
Readme
Utility Toolkit
Utility Toolkit is a collection of useful JavaScript functions for common tasks.
Installation
You can install Utility Toolkit via npm:
npm install utility-toolkit
Usage
const Utils = require('utility-toolkit');
// Example usage of capitalize function
console.log(Utils.capitalize('hello')); // Output: Hello
// Example usage of isEven function
console.log(Utils.isEven(5)); // Output: false
// Example usage of getRandomNumber function
console.log(Utils.getRandomNumber(1, 10)); // Output: Random number between 1 and 10
// Example usage of shuffleArray function
console.log(Utils.shuffleArray([1, 2, 3, 4, 5])); // Output: Shuffled array
Available Functions
capitalize(str)
: Capitalizes the first letter of a string.isEven(num)
: Checks if a number is even.getRandomNumber(min, max)
: Generates a random number within a specified range.shuffleArray(array)
: Shuffles the elements of an array.
License
This project is licensed under the MIT License - see the LICENSE file for details.