Functional Programming with Lodash

Опубликовано: 31 Июль 2026
на канале: I Have No Name
318
0

00:00:00 What?

00:00:01 What For?

00:00:09 _.compact()

00:00:11 _.object()

00:00:22 _.where()

00:00:35 _.min And _.max

00:00:52 Micro Templating

00:00:54 _.template

00:01:09 _.templateSettings

00:01:23 Optimization

00:01:34 Source Map

00:01:51 Important Functions

00:01:53 Cons

00:02:00 _.zip

00:02:03 Objet Oriented Vs Functional

"A utility library delivering consistency, customization, performance, & extras."

Probably the above does not make any sense to you. Here is another try. Lodash is a drop-in replacement for underscore, the latter having been around longer. Let's explain underscore then.

Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects. It’s the answer to the question: “If I sit down in front of a blank HTML page, and want to start being productive immediately, what do I need?”

Underscore provides 80-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, javascript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so modern browsers will use the native implementations of forEach, map, reduce, filter, every, some and indexOf.

Now, Lodash is faster and thus better :)