# You Don't Need Lodash Underscore | List Of JavaScript Methods Which You Can Use Plugins

**URL:** <https://onehack.st/t/you-dont-need-lodash-underscore-list-of-javascript-methods-which-you-can-use-plugins/288111>\
**Category:** Tools & Scripts\
**Tags:** tools, freebies\
**Created:** [August 1, 2024, 8:56pm UTC](https://onehack.st/t/you-dont-need-lodash-underscore-list-of-javascript-methods-which-you-can-use-plugins/288111 "2024-08-01T20:56:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prometheus](https://onehack.st/user_avatar/onehack.st/prometheus/32/34950_2.png) [@Prometheus](https://onehack.st/u/Prometheus)\
**Post date:** [August 1, 2024, 8:56pm UTC](https://onehack.st/t/you-dont-need-lodash-underscore-list-of-javascript-methods-which-you-can-use-plugins/288111/1 "2024-08-01T20:56:19Z")

</div>

# [You don’t (may not) need Lodash/Underscore](https://you-dont-need.github.io/You-Dont-Need-Lodash-Underscore/#/)

[![Join the community on Spectrum](https://camo.githubusercontent.com/758ba0fa63f2a6496d30b638d9750568a8d29f0b973418025c9f8db606b3fe6f/68747470733a2f2f77697468737065637472756d2e6769746875622e696f2f62616467652f62616467652e737667)](https://spectrum.chat/you-dont-need/lodash-underscore) [![Gitter](https://camo.githubusercontent.com/2da7039d862cabe847953554272000b86e80b158a0723c9a832720b935df3f43/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/cht8687/You-Dont-Need-Lodash-Underscore)

Lodash and Underscore are great modern JavaScript utility libraries, and they are widely used by Front-end developers. However, when you are targeting modern browsers, you may find out that there are many methods which are already supported natively thanks to ECMAScript5 [ES5] and ECMAScript2015 [ES6]. If you want your project to require fewer dependencies, and you know your target browser clearly, then you may not need Lodash/Underscore.

You are welcome to contribute with more items provided below.

- If you are targeting legacy JavaScript engine with those ES5 methods, you can use [es5-shim](https://github.com/es-shims/es5-shim)
- Please note that, the examples used below are just showing you the native alternative of performing certain tasks. For some functions, Lodash provides you more options than native built-ins. This list is not a 1:1 comparison.
- Please send a PR if you want to add or modify the code. No need to open an issue unless it’s something big and you want to discuss.

## Voice of Developers

> [Make use of native JavaScript object and array utilities before going big.](https://twitter.com/codylindley/status/692356631007342593)

> —Cody Lindley, Author of [jQuery Cookbook](http://shop.oreilly.com/product/9780596159788.do) and [JavaScript Enlightenment](http://shop.oreilly.com/product/0636920027713.do)

> [You probably don’t need Lodash. Nice List of JavaScript methods which you can use natively.](https://twitter.com/daniellmb/status/692200768556916740)

> —Daniel Lamb, Computer Scientist, Technical Reviewer of [Secrets of the JavaScript Ninja](https://www.manning.com/books/secrets-of-the-javascript-ninja-second-edition) and [Functional Programming in JavaScript](https://www.manning.com/books/functional-programming-in-javascript)

> [I guess not, but I want it.](https://twitter.com/teropa/status/692280179666898944)

> —Tero Parviainen, Author of [build-your-own-angular](http://teropa.info/build-your-own-angular)

> [I’ll admit, I’ve been guilty of overusing #lodash. Excellent resource.](https://twitter.com/therebelrobot/status/692907269512642561)

> —@therebelrobot, Maker of web things, Facilitator for Node.js/io.js

## ESLint Plugin

[![NPM Version](https://camo.githubusercontent.com/b035af7e2ddf92990adb0fd98ff13d70532a3f4932e56569a6f00a28885ce31e/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f65736c696e742d706c7567696e2d796f752d646f6e742d6e6565642d6c6f646173682d756e64657273636f72652e7376673f7374796c653d666c61742d737175617265)](https://www.npmjs.com/package/eslint-plugin-you-dont-need-lodash-underscore) [![Downloads](https://camo.githubusercontent.com/ca92b6eb575776a6e8f461ad9046335868bc9185dfb3bd516b4745141c57e910/687474703a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f65736c696e742d706c7567696e2d796f752d646f6e742d6e6565642d6c6f646173682d756e64657273636f72652e7376673f7374796c653d666c61742d737175617265)](https://www.npmjs.org/package/eslint-plugin-you-dont-need-lodash-underscore) [![Build Status](https://camo.githubusercontent.com/b77089b9e87e2df64e0aa339c11409ee09fee331e447bde9d3cffae6928bd141/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f796f752d646f6e742d6e6565642f596f752d446f6e742d4e6565642d4c6f646173682d556e64657273636f72652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/you-dont-need/You-Dont-Need-Lodash-Underscore) [![Coverage Status](https://camo.githubusercontent.com/398784786d63e172e58fd8a9806b91750042fd72f63aaf7292a2b70b524a72f6/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f796f752d646f6e742d6e6565642f596f752d446f6e742d4e6565642d4c6f646173682d556e64657273636f72652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/you-dont-need/You-Dont-Need-Lodash-Underscore?branch=master)

If you’re using [ESLint](http://eslint.org/), you can install a [plugin](http://eslint.org/docs/user-guide/configuring#using-the-configuration-from-a-plugin) that will help you identify places in your codebase where you don’t (may not) need Lodash/Underscore.

Install the plugin …

npm install --save-dev eslint-plugin-you-dont-need-lodash-underscore

… then update your config

“extends” : [“plugin:you-dont-need-lodash-underscore/compatible”],

For more information, see [Configuring the ESLint Plugin](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/blob/master/configuring.md)

Important

Note that, while many Lodash methods are null safe (e.g. \_.keys, \_.entries), this is not necessarily the case for their Native equivalent. If null safety is critical for your application, we suggest that you take extra precautions [e.g. consider using the native `Object.keys` as `Object.keys(value || {})`].

## Quick Links

**[Array](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#array)**

1. [\_.chunk](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_chunk)
2. [\_.compact](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_compact)
3. [\_.concat](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_concat)
4. [\_.difference](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_difference)
5. [\_.drop](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_drop)
6. [\_.dropRight](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_dropRight)
7. [\_.fill](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_fill)
8. [\_.find](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_find)
9. [\_.findIndex](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_findindex)
10. [\_.first](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_first)
11. [\_.flatten](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flatten)
12. [\_.flattenDeep](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flattendeep)
13. [\_.fromPairs](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_frompairs)
14. [\_.head and \_.tail](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_head-and-_tail)
15. [\_.indexOf](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_indexof)
16. [\_.intersection](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_intersection)
17. [\_.isArray](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isarray)
18. [\_.isArrayBuffer](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isarraybuffer)
19. [\_.join](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_join)
20. [\_.last](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_last)
21. [\_.lastIndexOf](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_lastindexof)
22. [\_.reverse](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_reverse)
23. [\_.slice](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_slice)
24. [\_.without](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_without)
25. [\_.initial](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_initial)
26. [\_.pull](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_pull)
27. [\_.unionBy](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_unionBy)

**[Collection\*](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#collection)**

Important

Note that most native equivalents are array methods, and will not work with objects. If this functionality is needed and no object method is provided, then Lodash/Underscore might be the better option. Bear in mind however, that all iterable objects can easily be converted to an array by use of the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax).

1. [\_.each](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each)
2. [\_.every](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_every)
3. [\_.filter](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_filter)
4. [\_.groupBy](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_groupby)
5. [\_.includes](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_includes)
6. [\_.keyBy](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_keyBy)
7. [\_.map](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_map)
8. [\_.minBy and \_.maxBy](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_minby-and-_maxby)
9. [\_.orderBy](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_sortby-and-_orderby)
10. [\_.pluck](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_pluck)
11. [\_.range](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_range)
12. [\_.reduce](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_reduce)
13. [\_.reduceRight](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_reduceright)
14. [\_.reject](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_reject)
15. [\_.size](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_size)
16. [\_.some](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_some)
17. [\_.sortBy](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_sortby-and-_orderby)
18. [\_.uniq](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_uniq)
19. [\_.uniqWith](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_uniqWith)

**[Function](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#function)**

1. [\_.after](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_after)
2. [\_.bind](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_bind)
3. [\_.debounce](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_debounce)
4. [\_.isFunction](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isFunction)
5. [\_.partial](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_partial)
6. [\_.throttle](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_throttle)

**[Lang](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#lang)**

1. [\_.castArray](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_castarray)
2. [.cloneDeep](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_clonedeep)
3. [\_.gt](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_gt)
4. [\_.gte](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_gte)
5. [\_.isDate](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isdate)
6. [\_.isEmpty](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isempty)
7. [\_.isFinite](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfinite)
8. [\_.isInteger](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isInteger)
9. [\_.isNaN](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isnan)
10. [\_.isNil](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isnil)
11. [\_.isNull](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isnull)
12. [\_.isUndefined](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isundefined)

**[Object](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#object)**

1. [\_.assign](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_assign)
2. [\_.defaults](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_defaults)
3. [\_.extend](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_extend)
4. [\_.has](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_has)
5. [\_.get](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get)
6. [\_.invert](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_invert)
7. [\_.isPlainObject](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isplainobject)
8. [\_.keys](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_keys)
9. [\_.mapKeys](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_mapKeys)
10. [\_.omit](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_omit)
11. [\_.pick](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_pick)
12. [\_.pickBy](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_pickby)
13. [\_.toPairs](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_topairs)
14. [\_.values](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_values)

**[String](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#string)**

1. [\_.capitalize](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_capitalize)
2. [\_.endsWith](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_endsWith)
3. [\_.isString](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isString)
4. [\_.lowerFirst](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_lowerFirst)
5. [\_.padStart and \_.padEnd](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_padstart-and-_padend)
6. [\_.repeat](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_repeat)
7. [\_.replace](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_replace)
8. [\_.split](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_split)
9. [\_.startsWith](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_startsWith)
10. [\_.template](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_template)
11. [\_.toLower](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_tolower)
12. [\_.toUpper](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_toupper)
13. [\_.trim](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_trim)
14. [\_.upperFirst](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_upperFirst)

**[Util](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#util)**

1. [\_.times](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_times)

**[Number](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#number)**

1. [\_.clamp](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_clamp)
2. [\_.inRange](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_inRange)
3. [\_.random](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_random)

## GitHub:

[https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore](https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore)
