Skip to content

underscore functions

This page collects native equivalents for common underscore functions.

The list will be expanded over time. Please let us know if you find something to add!

_.isObject(x)

const isObject = x => x === Object(x);

_.isArray(x)

Array.isArray(x)

_.has(x, p)

const has = (x, p) => x === Object(x) && x.hasOwnProperty(p);

_.isEqual(x, y)

const isEqual = (x, y) => JSON.stringify(x) === JSON.stringify(y)