From 8d632ada0b114f908496df8e0fb4deaecb6245ba Mon Sep 17 00:00:00 2001
From: Jeremy Ashkenas
noConflict,
identity, times,
- breakLoop, uniqueId,
- template
+ breakLoop, mixin,
+ uniqueId, template
@@ -982,6 +982,23 @@ _.each([1, 2, 3], function(num) { result; => 2 +
+ mixin_.mixin(object)
+
+ Allows you to extend Underscore with your own utility functions. Pass
+ a hash of {name: function} definitions to have your functions
+ added to the Underscore object, as well as the OOP wrapper.
+
+_.mixin({
+ capitalize : function(string) {
+ return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase();
+ }
+});
+_("fabio").capitalize();
+=> "Fabio"
+
+
uniqueId_.uniqueId([prefix])