Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Choose a tag to compare

@jdaltonjdalton released this 12 Jan 22:35
· 1558 commits to main since this release

lodash v4.0.0

2015 was big year!Lodash became themost depended on npm package, passed1 billion downloads, & its v3 release saw massive adoption!

The year was also one of collaboration, as discussions began onmerging Lodash & Underscore. Much of Lodash v4 is proofing out the ideas from those discussions. Lodash v4would not be possible without the collaboration & contributions of the Underscore core team. In the spirit of merging our teams have blended withseveral members contributing to both libraries.

For 2016 &lodash v4.0.0 we wanted to cut loose, push forward, & take things up a notch!

Modern only

With v4 we’re breaking free fromold projects, old environments, & droppingold IE < 9 support!

4 kB Core

Lodash’s kitchen-sink size will continue to grow as new methods & functionality are added. However, we now offer a 4 kB (gzipped)core build that’s compatible withBackbone v1.2.4 for folks who want Lodash without lugging around the kitchen sink.

More ES6

We’ve continued to embrace ES6 with methods like_.isSymbol, added support for cloning & comparing array buffers, maps, sets, & symbols, converting iterators to arrays, & iterable_(…).

In addition, we’ve published anes-build & pulledbabel-plugin-lodash into core to make tree-shaking a breeze.

More Modular

Pop quiz! 📣

What category path does thebindAll method belong to? Is it

A)require('lodash/function/bindAll')
B)require('lodash/utility/bindAll')
C)require('lodash/util/bindAll')

Don’t know? Well, with v4 it doesn’t matter because now module paths are as simple as

varbindAll=require('lodash/bindAll');

We’ve also reduced module complexity making it easier to create smaller bundles. This has helped Lodash adoption with libraries likeAsync &Redux!

1st Class FP

With v3 we introducedlodash-fp. We learned a lot & with v4 we decided topull it into core.

Now you can get immutable, auto-curried, iteratee-first, data-last methods as simply as

var_=require('lodash/fp');varobject={'a':1};varsource={'b':2};varnewObject=_.assign(source)(object);console.log(newObject);// => { 'a': 1, 'b': 2 }console.log(object);// => { 'a': 1 }varconvert=require('lodash/fp/convert');varassign=convert('assign',require('lodash.assign'));// works too!

Chakra Optimized

Well actually, while we’reexcited about Chakra, Lodash is optimized for great performance acrossall engines. Unlike many libraries, we don’t favor a single engine so we can deliver solid performance & support regardless of engine.

With v4 we’ve continued our commitment to performance; expanding support for lazy evaluation & improving the performance of core functionality like circular reference detection.

Emojis

Taking things up a notch Lodash v4 has added support for emojis! Includes things like
astral symbols,unicode modifiers,variation selector characters,zero-width joiners, &regional indicator symbols.

Breaking changes

We’ve introduced more breaking changes in this release than any other so be sure to check out thechangelog for a full rundown of changes & givelodash-migrate a spin to help migrate older Lodash code to the latest release.

If you dig Lodash don’t forget tostar the repo ornpm star lodash!

Assets2
Loading
aryankush25, xxxxxs0, andreylysenko, muhammadilyas-mset, Mlmolefe2, yonics12, huynhdev24, and Shahnazaouliaei reacted with thumbs up emojielinaGittHuB reacted with hooray emojiunix and xxxxxs0 reacted with heart emojiFlorianWendelborn, xxxxxs0, chriswongez, and Shahnazaouliaei reacted with rocket emoji
12 people reacted

[8]ページ先頭

©2009-2025 Movatter.jp