DEVerything
Everything you constantly need for development (and probably still copy-pasting from other projects)
The promise:
- 1️⃣ 1 package: say goodbye to lodash, faker, this and that and the other package.
- 0️⃣ 0 dependencies: keep it simple and lightweight.
- 🏆 Pick the best: the code is minimal and uses the best current practices and is optimized for max performance.
- 👪🏼 Typescript: use it, support it and export it.
- 🌊 Intuitive: favour always the most intuitive API and common usage, never throw errors unless asked.
- 🙈 Semantic: use simple function names that are easy to remember, no complicated options.
Contributions always welcome!
Validators
isArray()
if the argument is an arrayisBrowser()
to detect if you are on the browserisClient()
to detect if you are ont the browser/clientisEmpty()
to check for empty object, empty array, empty string, null or undefinedisJsDate()
if it's a valid javascript's DateisObject()
if it's a js ObjectisServer()
if you are on the serverisStringDate()
if the string passed is a valid date
Helpers
array()
create an arbitrary array based on a functionfirst()
get the first element of an arraylast()
get the last element of an arraymoveToFirst()
move array element to firstmoveToLast()
move array element to lastparseDate()
pass anything Date-Like, and get a JS Date back
Random data generators
These functions are optimized for low entropy random data generation useful for Unit Testing, Storybook, Pass real validations, Reverse hacking, Penetration testing...
randomAddress()
randomArrayItem()
randomBool()
randomDate()
randomFutureDate()
randomPastDate()
randomEmail()
randomInt()
randomName()
randomFirstName()
randomLastName()
randomFullName()
randomHandle()
TypeScript Helpers
Maybe
MaybePromise
MaybePromiseOrValue
MaybePromiseOrValueArray
DateLike
NonUndefined