Pedash 🌶
A simple Javascript utilities library to ease your daily development routines. You can think of it as a mini-lodash.
Anyway, pedash means spicy in Bahasa Indonesia, literally. 🌶🥵🥵
How to use
Install
npm install pedash
or yarn add pedash
Import it somewhere in your app
import { getLongest } from pedash;
// Then use it whatever you like
const foods = ["Pizza", "Lasagna", "Karedok", "Banana split", "Rendang", "Souffle"];
console.log(getLongest(foods));
// "Banana split"
Available methods
getCharCountsByKey(arr: any[])
// Example
randomId()
// Example
getLongest(arr: any[], key?: string)
// Example
getUnique(arr: any[])
// Example
groupByKey(arr: any[], key?: string)
// Example
getHighest(arr: any[], key?: string)
// Example
shuffle(arr: any[])
import { shuffle } from pedash;
// Then use it whatever you like
const numbers = [56, 89, 21, 20, 7];
console.log(shuffle(numbers));
// [7, 20, 21, 56, 89]