Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Lodash Breaking Changes

    Introduction to Lodash

    John LindquistJohn Lindquist

    Lodash is a toolkit of Javascript functions that provides clean, performant methods for manipulating objects and collections. It is a "fork" of the Underscore library and provides additional functionality as well as some serious performance improvements. If you aren't using Lodash, you should be.



    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson




    Narrator: Lo-Dash is an insanely helpful set of utilities for both for the browser and node. Let's say for example I want to get the first three values out of this set of people. I can just say first three, run it, and I can get the first three people.

    If I want to sort by their names, I can just say sort by name. You can see now it's sorted by name. If I want it to sort by their age, I can now sort by their age. If I only want to get a new array of just the names and I don't care about the values, I could get that. I could then sort them and get those.

    If I only wanted to get the people who are of the age of 22, I could say age 22 and return all those people. Again, do something like a sort. Or if I wanted to get the oldest person, I could say max and check the age and get the oldest person. Or if I get the youngest person, let's say min and age, and on and on and on.

    Lo-Dash does have a ton of features. If you want to read about all of them, go their API documentation at Lo-Dash.com/docs. If you're familiar with other libraries like Underscore, which Lo-Dash came from, or something like Sugar JS. These are all very similar but Lo-Dash has seen the greatest adoption in the community due to its performance and features and other things like that.

    We'll be doing a lot more videos on Lo-Dash as well as simply using Lo-Dash in videos, because it's such a great library.