LoginSignup
2
1

More than 5 years have passed since last update.

underscore#eachはbreakできない、lodash#eachはbreakできる

Posted at

underscore

It's also good to note that an each loop cannot be broken out of — to break, use _.find instead.

ループをbreakできないのでfind使うといい、って言ってる。

lodash

Iteratee functions may exit iteration early by explicitly returning false.

falseを返せばループが止まる、って言ってる。

まとめ

これだけでも「lodash使お」って思うには十分だと思ってる。

統合の話とかもあるけど今どうなってるんだろ。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1