0.0.6 • Published 1 year ago
mam-helpers v0.0.6
MAM Helpers
WIP
Levenshtein Distance
getEditDistance("Koala", "Koala"); // >> 0
getEditDistance("Koala", "Koalin"); // >> 2Random Number (Both included)
getRandomNumber(10, 20); // >> 15
getRandomNumber(10, 20); // >> 10
getRandomNumber(10, 20); // >> 20Get Random Boolean
getRandomBoolean(); // true
getRandomBoolean(); // falseGet Random Element from Array
getRandomElement([1, 2, 3, 4, 5]); // 3
getRandomElement([1, 2, 3, 4, 5]); // 1Shuffle Array (Returns a Copy not affecting the passed array)
shuffleArray([1, 2, 3, 4, 5]); // [3, 2, 5, 4, 1]Capitalize first letter
capitalizeFirstLetter("clear sky"); // Clear skyCapitalize first letter of each word
capitalizeEachWord("clear sky"); // Clear Sky