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 CHANGED
@@ -31,7 +31,6 @@ end
31
31
 
32
32
  task :make_all_versions do
33
33
  versions = %w[
34
- 0.1.0
35
34
  0.1.1
36
35
  0.2.0
37
36
  0.3.0
@@ -1,5 +1,5 @@
1
1
  module Underscore
2
2
  module Source
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -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.0',
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;
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: underscore-source
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel X. Moore