CH API:http://www.css88.com/doc/underscore/
EN API: http://underscorejs.org/#
mixin_.mixin(object)
您可以用您自己的实用程序函数扩展Underscore。传递一个 {name: function}定义的哈希添加到Underscore对象,以及面向对象包装。
_.mixin({ capitalize : function(string) { return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase(); } }); _("fabio").capitalize(); => "Fabio"