From 89cac4071ee30a1af7d7ea87a933b2b92bee5c54 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sat, 13 Feb 2010 02:03:48 -0500 Subject: [PATCH] updating underscore.coffee to 0.5.8 --- examples/underscore.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/underscore.coffee b/examples/underscore.coffee index a34a1ce8..4d4dfe72 100644 --- a/examples/underscore.coffee +++ b/examples/underscore.coffee @@ -47,7 +47,7 @@ # Current version. - _.VERSION: '0.5.7' + _.VERSION: '0.5.8' # ------------------------ Collection Functions: --------------------------- @@ -58,7 +58,7 @@ index: 0 try return obj.forEach(iterator, context) if obj.forEach - if _.isArray(obj) or _.isArguments(obj) + if _.isNumber(obj.length) return iterator.call(context, obj[i], i, obj) for i in [0...obj.length] iterator.call(context, val, key, obj) for key, val of obj catch e @@ -147,7 +147,7 @@ # Determine if a given value is included in the array or object, # based on '==='. _.include: (obj, target) -> - return _.indexOf(obj, target) isnt -1 if _.isArray(obj) + return _.indexOf(obj, target) isnt -1 if obj and _.isFunction(obj.indexOf) for key, val of obj return true if val is target false