Skip to content

helpers4 vs Radashi — Detailed Comparison

Radashi is a general-purpose TypeScript utility toolkit (~130 functions), and the actively maintained fork of Radash. The two libraries are complementary, not competing.

This page details the differences to help you decide whether you need helpers4, radashi, or both.

helpers4radashi
GoalDomain-specific helpers not found in general toolkitsGeneral-purpose utility belt
ScopeWelcomes domain-specific categories (URL, date, semver…)Core limited to the most popular/common utilities
Package strategyIndependent @helpers4/* packages per categorySingle radashi package
DependenciesZero runtime dependenciesZero dependencies
LicenseLGPL-3.0MIT

helpers4 was born from a recurring problem: repeatedly recoding the same domain-specific helpers (URL manipulation, string humanisation, promise guards…) across projects due to licensing constraints. These helpers follow the same lean ethos as general toolkit libraries but are typically considered too niche for inclusion in them.

The question was raised directly to the Radashi community: “How Far Should More Helper Functions Be Integrated?”. The answer was clear — Radashi core stays focused on the most popular utilities, and niche helpers belong either in a future radashi-edge package or in complementary third-party libraries. This confirmed the need for helpers4 as a standalone project.

A concrete example played out with PR #328, which proposed 6 URL helpers (from helpers4) to Radashi core. The PR was acknowledged as well-built, but the maintainers felt the functions weren’t common enough for inclusion in core — reinforcing the complementary positioning of both libraries.

  • Breadth vs focus: helpers4 embraces categories that radashi deliberately excludes — dates, URLs, semver, observables — because they don’t meet radashi’s popularity threshold for core.
  • Tree-shaking makes breadth viable: With modern bundlers, having many functions in independent packages adds zero overhead. helpers4 leans into this.
  • Complementary, not competing: helpers4 and radashi target different use cases and are designed to work together.

What helpers4 adds that radashi doesn’t have

Section titled “What helpers4 adds that radashi doesn’t have”
FunctionDescription
compareCompare two dates with configurable precision
daysDifferenceNumber of days between two dates
isSameDayCheck if two dates are the same calendar day
safeDateParse dates safely (handles timestamps in seconds)
toISO8601 / toRFC2822 / toRFC3339Format dates to standard formats
isTimestampInSecondsDetect if a timestamp is in seconds vs milliseconds
normalizeTimestampNormalize any timestamp to milliseconds
dateToISOStringSafe ISO string conversion

radashi has no date utilities.

FunctionDescription
cleanPathNormalize a URL path
extractPureURIStrip query params and fragments
onlyPathExtract the path from a full URL
relativeURLToAbsoluteConvert relative URLs to absolute
withLeadingSlash / withoutLeadingSlashEnsure/remove leading slash
withTrailingSlash / withoutTrailingSlashEnsure/remove trailing slash

radashi has no URL utilities.

Version / Semver utilities (@helpers4/version)

Section titled “Version / Semver utilities (@helpers4/version)”
FunctionDescription
parseParse a semver string into components
compareCompare two semver versions
incrementBump major/minor/patch/prerelease
satisfiesRangeCheck if a version satisfies a range
stripVRemove the v prefix

radashi has no semver utilities.

Observable utilities (@helpers4/observable)

Section titled “Observable utilities (@helpers4/observable)”
FunctionDescription
combineCombine multiple observables into one
combineLatestCombine latest values from multiple observables

radashi has no RxJS / observable utilities.

FunctionDescription
truthyPromiseOrThrowAssert a promise resolves to a truthy value
falsyPromiseOrThrowAssert a promise resolves to a falsy value
meaningPromiseOrThrowAssert a promise resolves to a non-empty value
consoleLogPromiseLog and pass-through in promise chains

radashi has retry, sleep, parallel, defer, guard — different async patterns, but no typed promise guards.

For functions that exist in both libraries, here’s how they compare:

helpers4radashiNotes
chunkclusterSame concept, different names
uniqueuniqueSame concept
differencediffSame concept
intersectionintersectsradashi returns boolean, helpers4 returns the intersection array
arrayEqualsisArrayEqualSame concept
deepComparehelpers4 only (array-specific deep comparison)
oneInCommonintersectsradashi’s intersects returns boolean like oneInCommon
createSortBy*Fnsorthelpers4 provides sort function factories; radashi has a single sort
helpers4radashiNotes
deepClonecloneDeepSame concept
deepMergeassignradashi’s assign does recursive merge
getgetSame concept
setsetSame concept
deepCompareisEqualSame concept (deep equality)
removeUndefinedNullshakeradashi’s shake removes any falsy by predicate
helpers4radashiNotes
camelCasecamelSame concept
capitalizecapitalizeSame concept
kebabCasedashSame concept (dash-case = kebab-case)
slugifyhelpers4 only
labelizetitleSimilar (humanize a key into a label)
errorToReadableMessagehelpers4 only
helpers4radashiNotes
debouncedebounceSame concept
throttlethrottleSame concept
memoizememoSame concept
helpers4radashiNotes
clampclampSame concept
roundToroundSame concept
randomBetweenrandomSame concept
helpers4radashiNotes
isArrayisArraySame
isBooleanisBooleanSame
isDateisDateSame
isEmptyisEmptySame
isFunctionisFunctionSame
isNumberisNumberSame
isObjectisObjectSame
isSetisSetSame
isStringisStringSame
isValidRegexhelpers4 only
ScenarioRecommendation
You need date formatting/comparisonhelpers4 (@helpers4/date)
You need URL path manipulationhelpers4 (@helpers4/url)
You need semver parsing/comparisonhelpers4 (@helpers4/version)
You need RxJS observable combinatorshelpers4 (@helpers4/observable)
You need typed promise guardshelpers4 (@helpers4/promise)
You need a general-purpose utility beltradashi
You need both domain-specific and general utilsboth — they work together

helpers4 and radashi are complementary. helpers4 focuses on domain-specific helpers (dates, URLs, semver, observables, promise guards) that general toolkit libraries like radashi don’t provide. Where their features overlap (arrays, objects, strings, functions), helpers4 provides its own implementation with zero runtime dependencies.