mam-helpers
v0.0.6
Published
MAM Helpers
Downloads
7
Maintainers
Readme
MAM Helpers
WIP
Levenshtein Distance
getEditDistance("Koala", "Koala"); // >> 0
getEditDistance("Koala", "Koalin"); // >> 2
Random Number (Both included)
getRandomNumber(10, 20); // >> 15
getRandomNumber(10, 20); // >> 10
getRandomNumber(10, 20); // >> 20
Get Random Boolean
getRandomBoolean(); // true
getRandomBoolean(); // false
Get Random Element from Array
getRandomElement([1, 2, 3, 4, 5]); // 3
getRandomElement([1, 2, 3, 4, 5]); // 1
Shuffle 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 sky
Capitalize first letter of each word
capitalizeEachWord("clear sky"); // Clear Sky