MENU
Lodash
Alexa's Ranking: 14,825
Lodash is a modern JavaScript utility library delivering modularity, performance & extras. Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc. Lodash's modular methods are great for:
Iterating arrays, objects, & strings
Manipulating & testing values
Creating composite functions
There are a few hundred Lodash utility functions.
_.defaults({ 'a': 1 }, { 'a': 3, 'b': 2 });// → { 'a': 1, 'b': 2 }_.partition([1, 2, 3, 4], n => n % 2);// → [[1, 3], [2, 4]]_.fromPairs([['a', 1], ['b', 2]]);// => { 'a': 1, 'b': 2 }_.compact([0, 1, false, 2, '', 3]);// => [1, 2, 3]_.zip(['a', 'b'], [1, 2], [true, false]);// => [['a', 1, true], ['b', 2, false]]var object = { 'a': 1, 'b': '2', 'c': 3 };_.omitBy(object, _.isNumber);// => { 'b': '2' }
<script src="lodash.js"></script>