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. After 10 years of rewriting the same utilities, the question became: should this effort go into an existing library, or into a standalone project?

The question was raised directly to the Radashi community: “How Far Should More Helper Functions Be Integrated?”. The answer from the Radashi maintainer was clear and fair: Radashi core stays focused on the most popular utilities, 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 case confirmed this: URL helpers proposed to Radashi core were acknowledged as well-built, but the Radashi maintainer raised a philosophical concern: “when encountering malformed paths, it’s often more maintainable to fix the issue at its source rather than normalising downstream.”

The counter-argument — and helpers4’s actual position — is that these utilities are string manipulations, no different in nature from capitalize or kebabCase. When a string arrives from a third-party API, a config file, or a legacy codebase, you cannot always “fix the source”. You need a clean, named, typed helper that does one obvious thing. cleanPath(url) is not masking a problem; it is the solution.

The two libraries ended up at different answers to the same question, and that’s fine. Radashi is a lean general-purpose toolkit; helpers4 is the pragmatic complement for everything that doesn’t meet that bar.

  • 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.