Skip to main content

equivalence Native Equivalence

Every Taphos function is @deprecated by design: The goal is to migrate to native JavaScript. But not all functions have a direct native equivalent. This page classifies each function by its native equivalence level.


Equivalence Levels

LevelMeaning
🟢 Native APIA direct native equivalent exists. You can replace the function with a single native call.
🟡 CompositionNo single native call, but achievable by composing a few native APIs together.
🔴 CustomNo real native equivalent. The function implements logic that doesn't exist natively.

Behavioral Differences

Some functions marked 🟢 or 🟡 have a native equivalent, but with subtle behavioral differences between taphos/lodash and the native implementation. These are marked with warning. Click on them to see the details.

These differences are intentional. Taphos aligns with modern JavaScript semantics rather than replicating every Lodash edge case. If Lodash returns true for isNaN(new Number(NaN)) but Number.isNaN doesn't, that's not a bug, that's the web moving forward.

tip

In most real-world code, these differences don't matter. The warning is there so you can make an informed decision, not to scare you away from migrating.


Functions by Level

🟢 Native API104/127
Array
at(), compact(), concat(), find(), findIndex(), first(), flatten(), flattenDeep(), flattenDepth(), fromPairs(), head(), indexOf() ⚠️, initial(), join(), last(), lastIndexOf() ⚠️, nth(), pullAll(), remove(), slice(), tail()
Collection
each(), eachRight(), every(), filter(), flatMap(), includes(), map(), pluck(), reduce(), reduceRight(), reject(), some(), uniq()
Function
bind(), defer(), delay(), partial(), rest(), spread(), unary()
Lang
eq() ⚠️, gt(), gte(), isBuffer(), isElement() ⚠️, isFinite(), isInteger(), isNaN() ⚠️, isSafeInteger(), isTypedArray() ⚠️, isWeakMap(), isWeakSet(), lt(), lte(), toInteger() ⚠️, toNumber(), toString() ⚠️
Math
add(), ceil() ⚠️, divide(), floor() ⚠️, max(), min(), multiply(), round() ⚠️, subtract()
Object
assign(), extend(), forIn() ⚠️, hasIn(), invoke(), keys(), toPairs(), unset(), update(), values()
String
endsWith(), lowerCase(), padEnd(), padStart(), parseInteger(), repeat(), replace(), split(), startsWith(), toLower(), toUpper(), trim(), trimEnd(), trimStart(), upperFirst()
Util
attempt(), castArray(), cloneDeep() ⚠️, constant(), identity(), property(), propertyOf(), stubArray(), stubFalse(), stubObject(), stubString(), stubTrue()
🟡 Composition21/127
Array
pull() ⚠️, pullAllBy() ⚠️, pullAllWith() ⚠️, pullAt() ⚠️, without(), zipObject()
Collection
flatMapDeep(), flatMapDepth(), size(), sortBy()
Function
wrap()
Lang
toFinite(), toSafeInteger() ⚠️
Object
create(), forOwn() ⚠️, transform() ⚠️
Util
nthArg(), overEvery(), overSome(), rangeRight(), toPath()
🔴 Custom2/127
String
pad(), upperCase()

Related