Gathering detailed insights and metrics for deverything
Gathering detailed insights and metrics for deverything
Gathering detailed insights and metrics for deverything
Gathering detailed insights and metrics for deverything
npm install deverything
Typescript
Module System
Node Version
NPM Version
TypeScript (99.82%)
JavaScript (0.18%)
Total Downloads
173,831
Last Day
426
Last Week
1,659
Last Month
7,312
Last Year
113,195
12 Stars
190 Commits
3 Forks
2 Watchers
22 Branches
9 Contributors
Updated on Apr 02, 2025
Latest Version
3.2.0
Package Id
deverything@3.2.0
Unpacked Size
589.59 kB
Size
175.36 kB
File Count
9
NPM Version
10.8.2
Node Version
20.19.0
Published on
Apr 02, 2025
Cumulative downloads
Total Downloads
Last Day
313.6%
426
Compared to previous day
Last Week
-2.9%
1,659
Compared to previous week
Last Month
-15.4%
7,312
Compared to previous month
Last Year
96.9%
113,195
Compared to previous year
The promise:
Contributions always welcome!
isArray()
isBoolean()
isBrowser()
to detect if you are on the browserisBuffer()
if it's a bufferisClient()
same as isBrowserisEmail()
this is a relaxed check, use your own validation if you need to be strictisEmpty()
to check for empty object, empty array, empty string, null or undefined
isEmptyString()
trims the string and checks if something is leftisEmptyArray()
checks if the array has no itemsisEmptyObject()
checks if the object has no keysisFile()
if it's a fileisFunction()
isJsDate()
if it's a valid javascript's Date
isFutureDate()
isPastDate()
isStringDate()
also checks if the string passed is a valid dateisKey()
is a real key of an objectisLastIndex()
is the index is the last item of arrayisNotEmptyString()
must have some text, checks for spaces-onlyisNumber()
if the arg is number, and also usable (no infinity)
isInt()
if it's an integerisEven()
isOdd()
isPositiveInt()
isNegativeInt()
isNumeric()
if string is representing a numberisObject()
if it's a js plain ObjectisPromise()
if it's a promiseisPWA()
to detect if you are on a PWAisReactElement()
if it's a valid React ElementisRegExp()
if it's a valid RegExpisSame()
Compare if dates, functions, arrays, objects or anything else are the sameisSequence()
if the array is a perfect sequenceisServer()
if you are on the serverisString()
isURL()
isUUID()
if it's a valid UUIDisOver18()
startOfNextMonth()
startOfNextWeek()
startOfThisWeek()
startOfToday()
startOfTomorrow()
average()
isBetween()
isOutside()
isStrictlyBetween()
max()
min()
multiply()
normaliseArray()
normaliseNumber()
percentageChange()
sum()
array()
create an arbitrary array based on a function
arrayDiff()
get the difference of two arraysarrayIntersection()
get the intersection of two arrayscapitalize()
word => Wordclamp()
clamp number in a rangecleanSpaces()
trims and turns double spaces into single spaceenumKeys()
enum FRUIT { APPLE, PEAR } => ["APPLE", "PEAR"]enumValues()
enum FRUIT { APPLE = 1, PEAR = 3 } => [1, 3]filterAlphanumeric()
remove non-alphanumeric charactersfirst()
get the first element of an arrayfirstKey()
get the first key of an objectfirstValue()
get the first value of an objectgetUrlSearchParam()
get URL search paramgetUrlSearchParams()
get URL search paramsgroupByKey()
incrementalId()
autoincremental SQL-like, process-unique numeric idkeysLength()
get the length of keys in an objectlast()
get the last element of an arraylastIndex()
get the last index of an arraymapByKey()
merge()
deep merge objectsmoveToFirst()
move array element to firstmoveToIndex()
move array element to desired indexmoveToLast()
move array element to lastnormalizeNumber()
normalizes between 0 and 1objectDiff()
get the difference between two objectsparseDate()
pass anything Date-Like, and get a JS Date backpluck()
make array of value from object keyspromiseWithTimeout()
takes a promise, a timeoutMs, and an option error as arguments. Returns a new Promise that either resolves with the value of the input promise or rejects with the provided error or a default error message if the input promise does not resolve or reject within the specified timeoutMs.scrambleText()
replace alpha chars with random charsseriesAsync()
executes promises in series, and returns all resultssetObjectPath()
set a value in an object by pathsetUrlSearchParams()
set URL search paramsshuffle()
shuffles elements in an arraysleep()
promise-based sleepstringify()
stringify anything, without breaking on circular dependenciestoggleArrayValue()
remove/add value in arraytruncate()
truncate text, does not break emojisuniqueValues()
gets unique values in an arrayformatCamelCase()
formatCookies()
{ cookie1: "1", cookie2: "2" } => "cookie1=1; cookie2=2"formatNumber()
1000 => "1,000" or "1K" or 0.112 => "11.2%"formatPercentage()
0.11 => "11%"formatIndexProgress()
=> "[2/10]"stringToCSSUnicode()
"hello" => "\000068\000065\00006c\00006c\00006f" use this for CSSstringToUnicode()
"hello" => "\u0068\u0065\u006c\u006c\u006f"These functions are optimized for low entropy random data generation useful for Unit Testing, Storybook, Pass real validations, Reverse hacking, Penetration testing...
randomAddress()
randomAlphaNumericCode()
randomArray()
randomArrayItem()
now supporting non-uniform distributionrandomBankAccount()
randomBool()
randomChar()
randomCompany()
randomCoords()
randomLat()
randomLng()
randomDate()
a safe range in decade
randomMaxDate()
a range in the Max dates allowed by JSrandomFutureDate()
randomPastDate()
randomDateRange()
=> { startDate, endDate }randomEmail()
randomEmoji()
randomEnumKey()
enum FRUIT { APPLE, PEAR } => APPLErandomEnumValue()
enum FRUIT { APPLE = 1, PEAR = 3 } => 3randomFile()
randomFloat()
randomObject()
randomHandle()
useful for social identifiers, or slugsrandomHexColor()
randomHexValue()
randomHtmlColorName()
randomIBAN()
randomInt()
randomBigInt()
randomMaxInt()
Range within the Maximum integer supported by jsrandomMaxSafeInt()
Range of very BIG integers, which are still safe to use thorandomNegativeInt()
< 0randomPositiveInt()
> 0randomIP()
randomName()
randomFirstName()
randomLastName()
randomFullName()
randomNumericCode()
randomObject()
randomParagraph()
randomPassword()
randomPath()
/path/to/somethingrandomPhoneNumber()
randomString()
randomSymbol()
randomUUID()
lightweight uuid generation, passing UUID validationrandomValue()
randomWord()
Coords
DateLike
Defined<T>
Dimensions
HashMap<>
BoolMap
NumberMap
StringMap
TrueMap
Key
Maybe<>
MaybePromise<>
MaybePromiseOrValue<>
MaybePromiseOrValueArray<>
NonUndefined
ObjectEntries<>
ObjectEntry<>
ObjectKey<>
ObjectKeys<>
ObjectValue<>
ObjectValues<>
PlainObject
use this instead of Record<,>
or extends object
, also makes sure it's not an arrayPickDefined<T, K>
PickRequired<T, K>
PlainKey
Point
VoidFn
After changes, run
pnpm release
To bump the version. CI will take care of publishing the package when merged.
No vulnerabilities found.
No security vulnerabilities found.