From 5ef845a663e7016dc949032aa918602ad2cd52d4 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Tue, 27 Oct 2009 15:01:34 -0400 Subject: [PATCH] changing include to use === instead of == --- underscore-min.js | 2 +- underscore.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/underscore-min.js b/underscore-min.js index 56b63e7bf..6aae0d7e7 100644 --- a/underscore-min.js +++ b/underscore-min.js @@ -1 +1 @@ -window._={VERSION:"0.1.0",each:function(c,f,a){var g=0;try{if(c.forEach){c.forEach(f,a)}else{if(c.length){for(var d=0;d=a.computed){a={value:g,computed:f}}});return a.value},min:function(d,c,b){if(!c&&_.isArray(d)){return Math.min.apply(Math,d)}var a;_.each(d,function(g,e){var f=c?c.call(b,g,e):g;if(a==null||fd?1:0}),"value")},sortedIndex:function(f,e,c){c=c||function(g){return g};var a=0,d=f.length;while(a>1;c(f[b])=0})})},zip:function(){var a=_.toArray(arguments);var d=_.max(_.pluck(a,"length"));var c=new Array(d);for(var b=0;b)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');");return b?a(b):a}}; \ No newline at end of file +window._={VERSION:"0.1.0",each:function(c,f,a){var g=0;try{if(c.forEach){c.forEach(f,a)}else{if(c.length){for(var d=0;d=a.computed){a={value:g,computed:f}}});return a.value},min:function(d,c,b){if(!c&&_.isArray(d)){return Math.min.apply(Math,d)}var a;_.each(d,function(g,e){var f=c?c.call(b,g,e):g;if(a==null||fd?1:0}),"value")},sortedIndex:function(f,e,c){c=c||function(g){return g};var a=0,d=f.length;while(a>1;c(f[b])=0})})},zip:function(){var a=_.toArray(arguments);var d=_.max(_.pluck(a,"length"));var c=new Array(d);for(var b=0;b)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');");return b?a(b):a}}; \ No newline at end of file diff --git a/underscore.js b/underscore.js index 22f5b2286..abec6fd9e 100644 --- a/underscore.js +++ b/underscore.js @@ -8,6 +8,8 @@ window._ = { VERSION : '0.1.0', + + /*------------------------ Collection Functions: ---------------------------*/ // The cornerstone, an each implementation. // Handles objects implementing forEach, each, arrays, and raw objects. @@ -200,7 +202,7 @@ window._ = { return _.toArray(obj).length; }, - //------------- The following methods only apply to arrays. ----------------- + /*-------------------------- Array Functions: ------------------------------*/ // Get the first element of an array. first : function(array) { @@ -272,7 +274,7 @@ window._ = { return -1; }, - /* -------------- The following methods apply to functions -----------------*/ + /* ----------------------- Function Functions: -----------------------------*/ // Create a function bound to a given object (assigning 'this', and arguments, // optionally). Binding with arguments is also known as 'curry'. @@ -318,7 +320,7 @@ window._ = { }; }, - /* ---------------- The following methods apply to objects ---------------- */ + /* ------------------------- Object Functions: ---------------------------- */ // Retrieve the names of an object's properties. keys : function(obj) { @@ -383,7 +385,7 @@ window._ = { return typeof obj == 'undefined'; }, - /* -------------- The following methods are utility methods --------------- */ + /* -------------------------- Utility Functions: -------------------------- */ // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids.