Skip to content

All Functions

168 implemented helpers + 40 covered by native JavaScript APIs, sorted alphabetically.

FunctionCategoryDescription
add / subtract (date arithmetic)datenative JS Temporal.PlainDate.prototype.add(duration) / .subtract(duration) (Temporal (Stage 3))
addDaysdateAdds days to a date.
addMonthsdateAdds months to a date.
addYearsdateAdds years to a date.
analyzeCommitscommitAnalyses a list of commits to suggest a semantic version bump.
buildConventionalCommitRegexcommitBuilds a regular expression matching the subject line of a Conventional Commits message.
camelCasestringConverts kebab-case to camelCase
capitalizestringCapitalizes the first letter of a string
ceil / floornumbernative JS Math.ceil() / Math.floor() (ES1)
chunkarrayChunks an array into smaller arrays of specified size
clampnumberClamps a number between min and max values
clampDatedateClamps a date to a [min, max] range.
cleanPathurlClean an URL by removing duplicate slashes.
combineobservableCombine two observables with a map function and an optional pre-treatment.
combineLatestobservableCombines multiple Observables to create an Observable whose values are calculated from the latest values of each of i…
compactarrayRemoves all falsy values (false, null, undefined, 0, "", NaN) from an array.
compactobjectRemoves all entries with falsy values (false, null, undefined, 0, "", NaN) from an object.
comparedateComparison of two dates.
compareversionCompares two semantic version strings according to SemVer 2.0.0 specification Supports: - Core version: MAJOR.MINOR.…
compare (ordering)datenative JS Temporal.PlainDate.compare(a, b) / Temporal.Instant.compare(a, b) (Temporal (Stage 3))
consoleLogPromisepromiseReturns a function that logs data to the console and passes it through.
createSortByDateFnarrayCreates a sort function for objects by date property
createSortByNumberFnarrayCreates a sort function for objects by number property
createSortByStringFnarrayCreates a sort function for objects by string property
dateToISOStringdateFormats a date to ISO string or returns null.
daysDifferencedateGets the difference in days between two dates.
daysInMonthdateReturns the number of days in the given month of the given year.
debouncefunctionCreates a debounced function that delays invoking func until after delay milliseconds have elapsed since the last tim…
deepCloneobjectCreates a deep copy of an object or array
deepCompareobjectDeep comparison of two objects that returns detailed information about differences.
deepEqualsarrayDeep comparison of two arrays that only returns true or false.
deepMergeobjectMerges two or more objects deeply
delaypromiseCreates a promise that resolves after specified delay
differencearrayReturns the difference between two arrays (items in first array but not in second)
differencedateCalculates the difference between two dates in the specified unit.
droparraynative JS Array.prototype.slice(n) (ES3)
eachDaydateReturns an array of Date objects for each day from start to end (inclusive).
eachMonthdateReturns an array of Date objects for the first day of each month from start to end (inclusive).
endOfdateReturns a new Date set to the end of the given unit.
ensureArrayarrayWraps a value in an array if it is not already one.
ensureDatedateSafely converts a date-like value to a valid Date object, or returns null.
equalsarraySimple helper that checks if two lists are identical.
extractErrorMessagestringConvert an error to a readable message.
extractPureURIurlExtracts the pure URI from a URL by removing query parameters and fragments.
falsyPromiseOrThrowpromiseReturns a function that passes through falsy data or throws an error.
find / findIndexarraynative JS Array.prototype.find() / findIndex() (ES2015)
flatten / flatarraynative JS Array.prototype.flat(depth?) (ES2019)
formatDurationdateFormats a duration in milliseconds as a compact human-readable string.
formatInTimezonedateFormats a date in a specific IANA timezone using Intl.DateTimeFormat.
formatSizenumberFormat a byte count into a human-readable string with the appropriate unit.
from (parse temporal string)datenative JS Temporal.Instant.from(str) / Temporal.PlainDate.from(str) / etc. (Temporal (Stage 3))
fromMillisdateCreates a Date from a timestamp in milliseconds.
fromSecondsdateCreates a Date from a timestamp in seconds.
getobjectGets a value from an object using a dot-notated path
getTimezoneOffsetdateReturns the UTC offset in minutes for the given IANA timezone at a specific point in time.
groupBy / grouparraynative JS Object.groupBy(arr, fn) (ES2024)
guardpromiseWraps a function so that if it throws, a default value is returned instead of propagating the error.
hasobjectnative JS Object.hasOwn(obj, key) (ES2022)
head / firstarraynative JS Array.prototype.at(0) (ES2022)
identityfunctionReturns the given value unchanged Useful as a default transform, in function composition, or as a placeholder mapper.
includesarraynative JS Array.prototype.includes() (ES2016)
incrementversionIncrements a semantic version
injectWordBreaksstringAdds word-break opportunities to a string so it can wrap cleanly in narrow UI containers such as side panels or table…
intersectionarrayCompute the intersection of two arrays, meaning the elements that are present in both arrays.
isArraytypeChecks if a value is an array.
isArrayBuffertypeChecks if a value is an ArrayBuffer instance.
isAsyncFunctiontypeChecks if a value is an async function.
isBigInttypeChecks if a value is a bigint.
isBlobtypeChecks if a value is a Blob instance.
isBooleantypeChecks if a value is a boolean.
isBuffertypeChecks if a value is a Node.js Buffer instance.
isBusinessDaydateChecks whether a date falls on a business day (i.e.
isConventionalCommitcommitChecks whether a commit message’s subject line follows the Conventional Commits format constrained by the given options.
isDatetypeChecks if a value is a Date instance.
isDefinedtypeChecks if a value is defined (not undefined nor null).
isDirectInstanceOftypenative JS value.constructor === Foo (ES1)
isEmptytypeChecks if a value is empty.
isErrortypeChecks if a value is an Error instance.
isFalsytypeChecks if a value is falsy (false, null, undefined, 0, "", NaN).
isFinite / isFiniteNumbertypenative JS Number.isFinite(value) (ES2015)
isFormDatatypeChecks if a value is a FormData instance.
isFunctiontypeChecks if a value is a function.
isHtmlElement / isUrlInstance / isUrlSearchParamstypenative JS value instanceof HTMLElement / URL / URLSearchParams (Web API)
isIntegertypenative JS Number.isInteger(value) (ES2015)
isIterabletypeChecks if a value is iterable (has a Symbol.iterator method).
isLeapYeardateReturns true if the given year is a leap year.
isMaptypeChecks if a value is a Map instance.
isNaNtypenative JS Number.isNaN(value) (ES2015)
isNegativeNumbertypeChecks if a value is a number less than 0.
isNonEmptyArraytypeChecks if a value is a non-empty array (length > 0).
isNonEmptyStringtypeChecks if a value is a non-empty string (length > 0).
isNulltypeChecks if a value is null.
isNullishtypeChecks if a value is null or undefined (nullish).
isNumbertypeChecks if a value is a number.
isPlainObjecttypeChecks if a value is a plain object.
isPositiveNumbertypeChecks if a value is a number greater than 0.
isPrereleaseversionReturns true when the version string has a prerelease suffix (i.e.
isPrimitivetypeChecks if a value is a JavaScript primitive.
isPromisetypeChecks if a value is a Promise or a thenable.
isRegExptypeChecks if a value is a RegExp instance.
isSafeIntegertypenative JS Number.isSafeInteger(value) (ES2015)
isSameDaydateChecks if two dates are the same day.
isSameMonthdateChecks if two dates are in the same month (and year).
isSameYeardateChecks if two dates are in the same year.
isSet (Set data structure)typenative JS value instanceof Set (ES2015)
isSpecialObjecttypeDetermines if a value is a special object that should not have its properties compared deeply.
isStringtypeChecks if a value is a string.
isSymboltypeChecks if a value is a symbol.
isTemporalDurationtypeChecks if a value is a Temporal.Duration.
isTemporalInstanttypeChecks if a value is a Temporal.Instant.
isTemporalPlainDatetypeChecks if a value is a Temporal.PlainDate.
isTemporalPlainDateTimetypeChecks if a value is a Temporal.PlainDateTime.
isTemporalPlainTimetypeChecks if a value is a Temporal.PlainTime.
isTemporalZonedDateTimetypeChecks if a value is a Temporal.ZonedDateTime.
isTimestamptypeChecks if a value is a valid timestamp (milliseconds or Unix seconds).
isTimestampInSecondsdateChecks if a timestamp is likely in seconds (Java/Unix style) vs milliseconds (JavaScript style)
isTruthytypeChecks if a value is truthy (not false, null, undefined, 0, "", or NaN).
isUndefinedtypeChecks if a value is undefined.
isValidDatetypeChecks if a value is a valid Date instance (not Invalid Date).
isValidDateStringdateChecks whether a string can be parsed into a valid Date.
isValidRegextypeChecks if a string is a valid regex pattern.
isWeakMap / isWeakSet / isWeakReftypenative JS value instanceof WeakMap / WeakSet / WeakRef (ES2015 / ES2021)
isWeekenddateChecks whether a date falls on a weekend day.
isWithinRangedateChecks whether a date falls within a range (inclusive on both ends).
kebabCasestringConverts camelCase to kebab-case
keys / valuesobjectnative JS Object.keys() / Object.values() (ES2017)
lastarraynative JS Array.prototype.at(-1) (ES2022)
listTimezonesdateReturns the list of IANA timezone identifiers supported by the runtime.
meaningPromiseOrThrowpromiseReturns a function that passes through meaningful data or throws an error.
memoizefunctionReturns a memoized version of the function that caches results
merge (shallow)objectnative JS { ...a, ...b } or Object.assign({}, a, b) (ES2015)
min / maxnumbernative JS Math.min(...arr) / Math.max(...arr) (ES1)
noopfunctionA no-operation function that does nothing and returns undefined Useful as a default callback, placeholder, or to e…
normalizeTimestampdateConverts a timestamp to JavaScript milliseconds format
now (date/time/instant)datenative JS Temporal.Now.instant() / .zonedDateTimeISO() / .plainDateISO() / .plainTimeISO() (Temporal (Stage 3))
omitobjectCreates a new object without the specified keys.
oneInCommonarraySimple helper that check if two lists shared at least an item in common.
onlyPathurlExtract only the path from an URI with optional query and fragments.
overlapsdateChecks whether two date ranges overlap.
padStart / padEndstringnative JS String.prototype.padStart() / padEnd() (ES2017)
parallelpromiseRuns an array of async functions with a concurrency limit.
parseversionParses a semantic version string into its components according to SemVer 2.0.0 specification Supports: - Core versio…
parseConventionalCommitcommitParses a Conventional Commits message into a structured object.
parsePackageRepositoryurlParse the repository field from package.json into a structured object.
partitionarraySplits an array into two groups based on a predicate function.
pascalCasestringConverts a string to PascalCase.
pickobjectCreates a new object with only the specified keys.
randomBetweennumberGenerates a random number between min and max (inclusive)
randomIntBetweennumberGenerates a random integer between min and max (inclusive)
rangearrayGenerates an array of sequential numbers from start to end (exclusive).
relativeURLToAbsoluteurlConverts a relative URL to an absolute URL using the current document base URI.
removeUndefinedNullobjectRemove null and undefined values from an object.
repeatstringnative JS String.prototype.repeat() (ES2015)
retrypromiseRetries a promise-returning function up to maxAttempts times
returnOrThrowErrorfunctionReturn a value or throw an error if null or undefined.
reversearraynative JS Array.prototype.toReversed() (ES2023)
roundTonumberRounds a number to specified decimal places
safeDatedateSafely creates a Date object from various input types.
safeJsonParseobjectParses a JSON string, returning null (or a fallback) on any parse failure.
samplearrayPicks one or more random elements from an array.
satisfiesRangeversionChecks if a version satisfies a range (simple implementation)
setobjectSets a value in an object using a dot-notated path
shallowEqualsarrayQuick comparison of two arrays using JSON.stringify.
shallowEqualsobjectQuick comparison of two objects using JSON.stringify.
shufflearrayRandomly reorders elements of an array using the Fisher-Yates algorithm.
slugifystringConverts a string into a URL-friendly slug.
snakeCasestringConverts a string to snake_case.
sortBy / orderByarraynative JS Array.prototype.toSorted(fn?) (ES2023)
sortNumberAscFnarraySort numbers in ascending order
sortNumberDescFnarraySort numbers in descending order
sortStringAscFnarraySort strings in ascending order
sortStringAscInsensitiveFnarraySort strings in ascending order (case insensitive)
sortStringDescFnarraySort strings in descending order
startOfdateReturns a new Date set to the start of the given unit.
startsWith / endsWithstringnative JS String.prototype.startsWith() / endsWith() (ES2015)
stringifyversionReconstruct a semantic version string from a ParsedVersion object.
stripVversionStrip the leading “v” from a version string if it exists.
sumnumberCalculates the sum of an array of numbers.
tailarraynative JS Array.prototype.slice(1) (ES3)
takearraynative JS Array.prototype.slice(0, n) (ES3)
throttlefunctionCreates a throttled function that only invokes func at most once per every wait milliseconds
timeAgodateFormats a date as a human-readable relative time string.
timeoutpromiseWraps a promise to reject with a TimeoutError if it does not resolve within the specified duration.
titleCasestringConverts a string to Title Case.
toInt / toFloatnumbernative JS parseInt(str, 10) / parseFloat(str) (ES1)
toISO8601dateConverts a date to ISO 8601 format Format: YYYY-MM-DDTHH:mm:ss.sssZ
toMillisdateConverts a date to a timestamp in milliseconds (epoch millis).
toPairs / fromPairsobjectnative JS Object.entries() / Object.fromEntries() (ES2019)
toPlainDate / toPlainDateTime / toPlainTimedatenative JS Temporal.ZonedDateTime.prototype.toPlainDate() / toPlainDateTime() / toPlainTime() (Temporal (Stage 3))
toRFC2822dateConverts a date to RFC 2822 format Format: Day, DD Mon YYYY HH:mm:ss +0000 Used in email headers (Date field) and HTT…
toRFC3339dateConverts a date to RFC 3339 format Format: YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss+HH:mm RFC 3339 is a profile of…
toSecondsdateConverts a date to a timestamp in seconds (epoch seconds).
toTemporalInstantdatenative JS Date.prototype.toTemporalInstant() (Temporal (Stage 3))
toZonedDateTimedatenative JS Temporal.Instant.prototype.toZonedDateTimeISO(tz) (Temporal (Stage 3))
trim / trimStart / trimEndstringnative JS String.prototype.trim() / trimStart() / trimEnd() (ES2019)
truncatestringTruncates a string to maxLength characters, appending an ellipsis when cut.
truthyPromiseOrThrowpromiseReturns a function that passes through truthy data or throws an error.
tryitpromiseWraps a function so it never throws.
TypedArrays (isInt8Array, isFloat32Array, ...)typenative JS value instanceof Int8Array / Float32Array / ... (ES2015)
uniquearrayRemoves duplicate values from an array
until / since (difference)datenative JS Temporal.PlainDate.prototype.until(other) / .since(other) (Temporal (Stage 3))
uuid7mathGenerates a UUID v7 string (RFC 9562).
WeekDaysdateNamed day-of-week constants following the JavaScript Date.getDay() convention.
withLeadingSlashurlAdds a leading slash / to the given URL if it is not already present.
withoutLeadingSlashurlRemoves the leading slash / from the given URL if it is present.
withoutTrailingSlashurlRemoves the trailing slash / from the given URL if it is present.
withResolverspromisenative JS Promise.withResolvers() (ES2024)
withTrailingSlashurlAdds a trailing slash / to the given URL if it is not already present.