underscoreに詳しくないので、勉強半分でソースコードを読む。
利用するバージョン
noConflictとは
underscorejs.orgのnoConflict
こんな説明。
_.noConflict()
Give control of the _ variable back to its previous owner.
Returns a reference to the Underscore object.
var underscore = _.noConflict();
_の変数のコントロールを以前のオーナーに与える。?
underscoreのobjectの参照を返す。
underscore.noConflict
コード的にはこのあたり。
// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
// previous owner. Returns a reference to the Underscore object.
_.noConflict = function() {
root._ = previousUnderscore;
return this;
};
root._にpreviousUnderscoreを代入する。
その後、thisを返す。