underscore-source 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -1
- data/lib/underscore-source/version.rb +1 -1
- data/vendor/assets/javascripts/underscore.js +13 -2
- metadata +1 -1
data/Rakefile
CHANGED
@@ -5,9 +5,11 @@
|
|
5
5
|
// Oliver Steele's Functional, And John Resig's Micro-Templating.
|
6
6
|
// For all details and documentation:
|
7
7
|
// http://documentcloud.github.com/underscore/
|
8
|
-
window.
|
8
|
+
window.Underscore = {
|
9
9
|
|
10
|
-
VERSION : '0.1.
|
10
|
+
VERSION : '0.1.1',
|
11
|
+
|
12
|
+
PREVIOUS_UNDERSCORE : window._,
|
11
13
|
|
12
14
|
/*------------------------ Collection Functions: ---------------------------*/
|
13
15
|
|
@@ -387,6 +389,13 @@ window._ = {
|
|
387
389
|
|
388
390
|
/* -------------------------- Utility Functions: -------------------------- */
|
389
391
|
|
392
|
+
// Run Underscore.js in noConflict mode, returning the '_' variable to its
|
393
|
+
// previous owner. Returns a reference to the Underscore object.
|
394
|
+
noConflict : function() {
|
395
|
+
window._ = Underscore.PREVIOUS_UNDERSCORE;
|
396
|
+
return this;
|
397
|
+
},
|
398
|
+
|
390
399
|
// Generate a unique integer id (unique within the entire client session).
|
391
400
|
// Useful for temporary DOM ids.
|
392
401
|
uniqueId : function(prefix) {
|
@@ -413,3 +422,5 @@ window._ = {
|
|
413
422
|
}
|
414
423
|
|
415
424
|
};
|
425
|
+
|
426
|
+
window._ = Underscore;
|