Giter Club home page Giter Club logo

Comments (2)

kentcdodds avatar kentcdodds commented on May 18, 2024

Underscore is super cool. But yes, I do prefer lodash. Here are a few of my reasons:

  • lodash follows semver, underscore does not. I cannot trust it.
  • lodash is faster (sorry, looks like benchmarks are down currently).
  • lodash has more functionality
  • @jdalton is one of my favorite devs ever (maybe he can chime in with some additional reasons).

It is notable that lodash and underscore are in the process of merging (🎉) into underdash (for the record, I'm not a fan of the name).

Hope that helps you understand the reasoning behind my preference.

from ama.

jdalton avatar jdalton commented on May 18, 2024

Thanks for the ping Kent!

Other reasons are:

  • Modular
    • lodash supports cherry-picking require('lodash/array/chunk') or require('lodash.chunk')
  • Embraces ES6
    • Support for es6 template delimiters
    • Support for Map or WeakMap backed _.memoize caches
    • Uses Set and WeakMap internally for performance gains
    • Has methods like _.includes, _.find, _.findIndex, _.spread, & _.restParam
    • Matches values based off SameValueZero
    • Detects array-like values based on the reverse of ToLength
    • Provides an es6 build.
  • Gives devs features by popular demand. So you get deep path looks ups, callback shorthands, deep cloning, and other features not available in Underscore.
  • ~100% code coverage
  • Customizable with lodash-cli
  • Supports a more FP style with lodash-fp

Lodash's v4 is a proof of concept of the Lodash+Underscore merge and should be out soon.

from ama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.