Recently, I started working on my own utils set of JavaScript functions that can be used on every day basis.
This is the current list (full docs can be found here):
- Compare objects
- Compare arrays
- Check if an array or an object is empty
- Make array unique
- Get min value of an array of numbers
- Get max value of an array of numbers
- Check if variable is an integer
- Create random number
- Cache function result
- Calculate how much time a function takes to run
Which functions do you use, in which cases, please comment down bellow, certainly I would consider all suggestions and add new functions as part of npm package.
Thank you for reading and all suggestions!
Latest comments (5)
Are you trying to create next
lodash
or something?Hmm... What about..
Good one! Added to version 1.0.9...
Safe number for price calculations.
map
andfilter
for objects. I've done this a couple of times.I've also used a "better"
typeof
.