Compatibility table
This table puts equivalent NoDash, Underscore, LoDash and ECMAScript’s functions side by side, noting their differences where applicable.
Green cells mark functions supported by NoDash and by one of the other libraries.
NoDash (T) | Underscore v1.10.2 (T) | LoDash v4.17.15 (T) | ECMAScript (T) |
---|---|---|---|
missing | missing | add | missing |
missing | after | after | missing |
ajax [14] | missing | missing | XHR/Fetch diff. name [6] |
all (alias of every) | all (alias of every) | missing | missing |
allKeys | allKeys | missing | missing |
any (alias of some) | any (alias of some) | missing | missing |
missing | missing | ary | missing |
assign (aliases) | assign (alias of extendOwn) | assign | assign |
missing | missing | assignIn (aliases) | missing |
missing | missing | assignInWith (aliases) | missing |
missing | missing | assignWith | missing |
at (aliases) [17] | missing | at | missing |
missing | missing | attempt | missing |
missing | before | before | missing |
bind (aliases) [22] | bind | bind | bind |
missing | bindAll | bindAll | missing |
missing | missing | bindKey | missing |
missing | missing | camelCase | missing |
missing | missing | capitalize | missing |
missing | missing | castArray | missing |
missing | missing | ceil | missing |
missing | chain | chain | missing |
chunk | chunk | chunk | missing |
missing | missing | clamp | missing |
missing | clone | clone | missing |
missing | missing | cloneDeep [13] | missing |
missing | missing | cloneDeepWith | missing |
missing | missing | cloneWith | missing |
missing | collect (alias of map) | missing | missing |
compact | compact | compact | missing |
missing | compose | missing | missing |
missing | missing | concat | missing |
missing | missing | cond | missing |
missing | missing | conforms | missing |
missing | missing | conformsTo | missing |
missing | constant | constant | missing |
contains (alias of includes) | contains | missing | missing |
countBy | countBy | countBy | missing |
missing | create | create | missing |
missing | missing | curry | missing |
missing | missing | curryRight | missing |
debounce | debounce | debounce | missing |
missing | missing | deburr | missing |
missing | defaults | defaults | missing |
missing | missing | defaultsDeep | missing |
missing | missing | defaultTo | missing |
defer | defer | defer | missing |
delay | delay | delay | setTimeout diff. name |
missing | detect (alias of find) | missing | missing |
difference | difference | difference | missing |
missing | missing | differenceBy | missing |
missing | missing | differenceWith | missing |
missing | missing | divide | missing |
drop (alias of rest) | missing | drop | missing |
dropRight (alias of initial) | missing | dropRight | missing |
missing | missing | dropRightWhile | missing |
missing | missing | dropWhile | missing |
each (alias of forEach) | each (aliases) | each (alias of forEach) | missing |
missing | missing | eachRight (alias of forEachRight) | missing |
endsWith | missing | endsWith | endsWith [6] |
entries (aliases) | missing | entries (alias of toPairs) | entries |
missing | missing | entriesIn (alias of toPairsIn) | missing |
missing | missing | eq | missing |
escape [20] | escape | escape | missing |
escapeRegExp | missing | escapeRegExp | missing |
every (aliases) | every (aliases) | every | every |
extend (alias of assign) | extend | extend (alias of assignIn) | missing |
missing | extendOwn (aliases) | missing | missing |
missing | missing | extendWith (alias of assignInWith) | missing |
fill | missing | fill | fill |
filter | filter (aliases) | filter | filter |
find | find (aliases) | find | find [6] |
findIndex (aliases) | findIndex | findIndex | findIndex [6] |
findKey (alias of findIndex) | findKey | findKey | missing |
missing | missing | findLast | missing |
missing | findLastIndex | findLastIndex | missing |
missing | missing | findLastKey | missing |
missing | findWhere | missing | missing |
first (aliases) | first | first (alias of head) | missing |
flat (aliases) | missing | missing | flat [6] |
missing | missing | flatMap | missing |
missing | missing | flatMapDeep | missing |
missing | missing | flatMapDepth | missing |
flatten (alias of flat) [1] | flatten | flatten | missing |
flattenDeep | missing | flattenDeep | missing |
flattenDepth (alias of flat) | missing | flattenDepth | missing |
flip (aliases) | missing | flip [19] | missing |
missing | missing | floor | missing |
missing | missing | flow | missing |
missing | missing | flowRight | missing |
missing | foldr (alias of reduceRight) | missing | missing |
forEach (aliases) | forEach (alias of each) | forEach (aliases) | forEach |
missing | missing | forEachRight (aliases) | missing |
missing | missing | forIn | missing |
missing | missing | forInRight | missing |
format | sprintf diff. name [23] | missing | missing |
forOwn (alias of forEach) | missing | forOwn | missing |
missing | missing | forOwnRight | missing |
fromEntries (aliases) | missing | missing | missing |
fromPairs (alias of fromEntries) | object diff. name [21] | fromPairs | missing |
missing | functions (aliases) | functions | missing |
missing | missing | functionsIn | missing |
missing | missing | get | missing |
groupBy | groupBy | groupBy | missing |
missing | missing | gt | missing |
missing | missing | gte | missing |
has | has | has | missing |
missing | missing | hasIn | missing |
missing | missing | missing | hasOwnProperty |
head (alias of first) | missing | head (aliases) | missing |
missing | identity | identity | missing |
includes (aliases) | missing | includes | includes |
indexBy (aliases) | indexBy | missing | missing |
indexOf | indexOf | indexOf | indexOf |
initial (aliases) | initial | initial | missing |
missing | missing | inRange | missing |
intersection | intersection | intersection | missing |
missing | missing | intersectionBy | missing |
missing | missing | intersectionWith | missing |
invert (alias of flip) | invert | invert | missing |
missing | missing | invertBy | missing |
invoke | invoke | invoke [8] | missing |
missing | missing | invokeMap | missing |
isArguments | isArguments | isArguments | missing |
isArray (alias of Array.isArray) | isArray | isArray | isArray |
missing | missing | isArrayBuffer | missing |
isArrayLike | missing | isArrayLike | missing |
missing | missing | isArrayLikeObject | missing |
missing | isBoolean | isBoolean | missing |
missing | missing | isBuffer | missing |
missing | isDate | isDate [11] | missing |
isElement | isElement | isElement | missing |
isEmpty | isEmpty | isEmpty | missing |
isEqual (alias of ==) [12] | isEqual | isEqual | missing |
missing | missing | isEqualWith | missing |
missing | isError | isError [11] | missing |
missing | isFinite | isFinite | missing |
missing | isFunction | isFunction [11] | missing |
missing | missing | isInteger | missing |
missing | missing | isLength | missing |
missing | isMap | isMap [11] | missing |
missing | isMatch | isMatch | missing |
missing | missing | isMatchWith | missing |
missing | isNaN | isNaN | missing |
missing | missing | isNative | missing |
missing | missing | isNil | missing |
missing | isNull | isNull | missing |
missing | isNumber | isNumber | missing |
missing | isObject | isObject | missing |
missing | missing | isObjectLike | missing |
missing | missing | isPlainObject | missing |
missing | isRegExp | isRegExp [11] | missing |
missing | missing | isSafeInteger | missing |
missing | isSet | isSet [11] | missing |
missing | isString | isString | missing |
missing | isSymbol | isSymbol | missing |
missing | missing | isTypedArray | missing |
missing | isUndefined | isUndefined [11] | missing |
missing | isWeakMap | isWeakMap [11] | missing |
missing | isWeakSet | isWeakSet [11] | missing |
missing | iteratee | iteratee | missing |
join | missing | join | join |
missing | missing | kebabCase | missing |
keyBy (alias of indexBy) | missing | keyBy | missing |
keys | keys | keys | keys |
missing | missing | keysIn | missing |
last (aliases) | last | last | missing |
lastIndexOf | lastIndexOf | lastIndexOf | lastIndexOf |
missing | missing | lowerCase | missing |
missing | missing | lowerFirst | missing |
missing | missing | lt | missing |
missing | missing | lte | missing |
map (aliases) | map (aliases) | map | map |
missing | missing | mapKeys | missing |
missing | mapObject | missing | missing |
mapValues (alias of map) | missing | mapValues | missing |
missing | matcher (aliases) | missing | missing |
missing | matches (alias of matcher) | matches | missing |
missing | missing | matchesProperty | missing |
max (aliases) | max | max | max |
maxBy (alias of max) | missing | maxBy | missing |
missing | missing | mean | missing |
missing | missing | meanBy | missing |
missing | missing | merge | missing |
missing | missing | mergeWith | missing |
missing | missing | method | missing |
missing | missing | methodOf | missing |
missing | methods (alias of functions) | missing | missing |
min (aliases) | min | min | min |
minBy (alias of min) | missing | minBy | missing |
missing | mixin | mixin [10] | missing |
missing | missing | multiply | missing |
negate | negate | negate | missing |
noConflict | noConflict | noConflict | missing |
NODASH | missing | VERSION diff. name | missing |
missing | noop | noop [9] | missing |
missing | now | now | missing |
nth (alias of at) | missing | nth | missing |
missing | missing | nthArg | missing |
object (aliases) [21] | missing | missing | missing |
omit | omit | omit | missing |
missing | missing | omitBy | missing |
once [16] | memoize diff. name | memoize diff. name | missing |
once | once | once | missing |
missing | missing | orderBy | missing |
missing | missing | over | missing |
missing | missing | overArgs | missing |
missing | missing | overEvery | missing |
missing | missing | overSome | missing |
missing | missing | pad [5] | missing |
padEnd | missing | padEnd | padEnd [6] |
padStart | missing | padStart | padStart [6] |
pairs (alias of entries) | pairs | missing | missing |
missing | missing | parseInt | missing |
partial (alias of bind) [22] | partial | partial | missing |
missing | missing | partialRight | missing |
partition | partition | partition | missing |
pick | pick | pick | missing |
missing | missing | pickBy | missing |
pluck | pluck | missing | missing |
property | property | property [18] | missing |
missing | propertyOf | propertyOf | missing |
missing | missing | prototype.at | missing |
missing | missing | prototype.chain | missing |
missing | missing | prototype.commit | missing |
missing | missing | prototype.next | missing |
missing | missing | prototype.plant | missing |
missing | missing | prototype.reverse | missing |
missing | missing | prototype.toJSON (alias of value) | missing |
missing | missing | prototype.value | missing |
missing | missing | prototype.valueOf (alias of value) | missing |
missing | missing | prototype[Symbol.iterator] | missing |
missing | missing | pull | missing |
missing | missing | pullAll | missing |
missing | missing | pullAllBy | missing |
missing | missing | pullAllWith | missing |
missing | missing | pullAt | missing |
random | random | random | random |
range | range | range | missing |
missing | missing | rangeRight | missing |
missing | missing | rearg [3] | missing |
reduce (aliases) | reduce | reduce | reduce |
reduceRight | reduceRight (aliases) | reduceRight | reduceRight |
reject (aliases) | reject | reject | missing |
remove (alias of reject) | missing | remove | missing |
repeat | missing | repeat | repeat [6] |
missing | missing | replace | missing |
rest (aliases) | rest | rest | missing |
missing | restArguments | missing | missing |
missing | result | result [15] | missing |
reverse | missing | reverse | reverse |
missing | missing | round | missing |
missing | missing | runInContext | missing |
sample | sample | sample | missing |
sampleSize (alias of shuffle) | missing | sampleSize | missing |
missing | select (alias of filter) | missing | missing |
missing | missing | set | missing |
missing | missing | setWith | missing |
shuffle (aliases) | shuffle | shuffle | missing |
sign (alias of Math.sign) | missing | missing | sign |
size | size | size | missing |
slice | missing | slice | slice |
missing | missing | snakeCase | missing |
some (aliases) | some (aliases) | some | some |
sort | missing | missing | sort |
sortBy | sortBy | sortBy | missing |
missing | sortedIndex | sortedIndex [4] | missing |
missing | missing | sortedIndexBy | missing |
missing | missing | sortedIndexOf | missing |
missing | missing | sortedLastIndex | missing |
missing | missing | sortedLastIndexBy | missing |
missing | missing | sortedLastIndexOf | missing |
missing | missing | sortedUniq | missing |
missing | missing | sortedUniqBy | missing |
missing | missing | split | missing |
missing | missing | spread | missing |
missing | missing | startCase | missing |
startsWith | missing | startsWith | startsWith [6] |
missing | missing | stubArray | missing |
missing | missing | stubFalse | missing |
missing | missing | stubObject | missing |
missing | missing | stubString | missing |
missing | missing | stubTrue | missing |
missing | missing | subtract | missing |
sum | missing | sum | missing |
missing | missing | sumBy | missing |
tail (alias of rest) | missing | tail | missing |
take (alias of first) | missing | take | missing |
takeRight (alias of last) | missing | takeRight | missing |
missing | missing | takeRightWhile | missing |
missing | missing | takeWhile | missing |
missing | tap | tap | missing |
template [2] | template | template | ES6/Backticks diff. name [6] |
missing | missing | templateSettings | missing |
missing | missing | templateSettings.escape | missing |
missing | missing | templateSettings.evaluate | missing |
missing | missing | templateSettings.imports | missing |
missing | missing | templateSettings.imports._ | missing |
missing | missing | templateSettings.interpolate | missing |
missing | missing | templateSettings.variable | missing |
throttle | throttle | throttle | missing |
missing | missing | thru | missing |
times | times | times | missing |
toArray | toArray | toArray | missing |
missing | missing | toFinite | missing |
missing | missing | toInteger | missing |
missing | missing | toLength | missing |
missing | missing | toLower | missing |
missing | missing | toNumber | missing |
toPairs (alias of entries) | missing | toPairs (aliases) | missing |
missing | missing | toPairsIn (aliases) | missing |
missing | missing | toPath | missing |
missing | missing | toPlainObject | missing |
missing | missing | toSafeInteger | missing |
missing | missing | toString | missing |
missing | missing | toUpper | missing |
transform (alias of reduce) | missing | transform | missing |
trim | missing | trim [5] | trim |
trimEnd (aliases) | missing | trimEnd | trimEnd (aliases) [6] |
trimLeft (alias of trimStart) | missing | missing | trimLeft (alias of trimStart) |
trimRight (alias of trimEnd) | missing | missing | trimRight (alias of trimEnd) |
trimStart (aliases) | missing | trimStart | trimStart (aliases) [6] |
missing | missing | truncate [5] | missing |
missing | missing | unary | missing |
missing | unescape | unescape | missing |
union | union | union | missing |
missing | missing | unionBy | missing |
missing | missing | unionWith | missing |
uniq (alias of unique) | uniq (aliases) | uniq | missing |
missing | missing | uniqBy | missing |
unique (aliases) | unique (alias of uniq) | missing | missing |
missing | uniqueId | uniqueId [7] | missing |
missing | missing | uniqWith | missing |
missing | missing | unset | missing |
unzip | unzip | unzip | missing |
missing | missing | unzipWith | missing |
missing | missing | update | missing |
missing | missing | updateWith | missing |
missing | missing | upperCase | missing |
missing | missing | upperFirst | missing |
missing | value | value (aliases) | missing |
values | values | values | values |
missing | missing | valuesIn | missing |
missing | where | missing | missing |
without | without | without | missing |
missing | missing | words | missing |
missing | wrap | wrap | missing |
missing | missing | xor | missing |
missing | missing | xorBy | missing |
missing | missing | xorWith | missing |
zip | zip | zip | missing |
zipObject (alias of object) | missing | zipObject | missing |
missing | missing | zipObjectDeep | missing |
missing | missing | zipWith | missing |
footnote1Underscore’s un:flatten() defaults to depth
of Infinity
while LoDash’s lo:flatten() and ES’ flat()
proposal (and NoDash’s flat()) – to depth
of 1.
footnote2NoDash’s template() syntax is not based on <%ERB%>
but on {{Mustache.js}}
.
footnote3sq:Sqimitive\Core::masker() provides a similar functionality.
footnote4sq:Sqimitive\Ordered::indexFor() provides a similar functionality.
footnote5Exists in Underscore.String: https://github.com/epeli/underscore.string/
footnote6Not supported natively in any version of Internet Explorer.
footnote7sq:Sqimitive\Core::unique() provides a similar functionality (but doesn’t prepend prefix
to the result).
footnote8NoDash’s invoke() and Underscore’s un:invoke() call a method on every object in an array parameter while LoDash’s lo:invoke() accepts a single object and calls a method on it.
footnote9sq:Sqimitive\Core::stub() is the same.
footnote10Underscore’s un:mixin() extends Underscore’s own functionality. LoDash’s lo:mixIn() is similar to sq:Sqimitive\Core::mixIn().
footnote11Use instanceof
to check for these types. For example: /0.*/ instanceof RegExp
.
footnote12Underscore’s un:isEqual() and LoDash’s lo:isEqual() are very elaborate. NoDash simply defers to ==
so in NoDash _.isEqual([], []) === false
while _.isEqual([], '') === true
.
footnote13sq:Sqimitive\Core::deepClone() and sq:Sqimitive\Core::deepCloner() (compiled version thereof) provide a similar functionality.
footnote14NoDash’s ajax() semantics is very similar to jQuery’s ajax()
.
footnote15sq:Sqimitive\Core::picker() provides a similar functionality.
footnote16NoDash’s once() can be used like un:memoize()/lo:memoize() with dumb hashFunction
/resolver
, returning the same cached value regardless of arguments.
footnote17LoDash’s lo:at() supports complex string path notation (a[0].b.c
).
footnote18LoDash’s lo:property() supports complex string path notation (a[0].b.c
) while in NoDash’s property() and Underscore’s un:property() a string stands for a single key.
footnote19LoDash’s lo:flip() is very different: it wraps a function, inverting its argument order.
footnote20Do not confuse escape() with the native o:escape() function used for URL encoding.
footnote21Underscore’s un:object() combines NoDash’s object() (takes two lists: keys and values) and fromEntries() (takes one list: key-value pairs).
footnote22NoDash’s bind() recognizes undefined
context to keep caller-provided this
while Underscore’s and LoDash’s assume globalThis
, like window
.
Underscore’s un:partial() and LoDash’s lo:partial() support placeholder arguments (_
) but bind() doesn’t, so partial() alias is not fully compatible.
footnote23Used to exist in Underscore.String: https://github.com/epeli/underscore.string/, was deprecated in favour of https://npmjs.org/package/sprintf-js.