LoginSignup
0
0

More than 5 years have passed since last update.

underscoreコードリーディング(noop)

Posted at

underscoreに詳しくないので、勉強半分でソースコードを読む。

利用するバージョン

underscore.js(v1.8.3)

noopとは

underscorejs.orgのnoop

こんな説明。

_.noop()

Returns undefined irrespective of the arguments passed to it.
Useful as the default for optional callback arguments.

obj.initialize = _.noop;

渡されるargumetntsに関係なく、undefinedを返す。
defaultのoptionalのcallback argumentとして役に立ちます。

underscore.noop

コード的にはこのあたり。

 _.noop = function(){};

0
0
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
0
0