Revert "switched to canonical two-space indentation in __bind helper"

This reverts commit 6a40807330.
This commit is contained in:
Jeremy Ashkenas 2011-05-28 18:58:38 -04:00
parent 79fff367c2
commit 7082000e66
1 changed files with 10 additions and 10 deletions

View File

@ -1770,16 +1770,16 @@ UTILITIES =
# Create a function bound to the current value of "this".
bind: '''
(Function.prototype.bind ? Function.prototype.call.bind(Function.prototype.bind) : function(fn, me){
return function bound(){
if (!(this instanceof bound))
return fn.apply(me, arguments);
var ctor = function(){};
ctor.prototype = fn.prototype;
var obj = new ctor();
fn.apply(obj, arguments);
return obj;
};
})
return function bound(){
if (!(this instanceof bound))
return fn.apply(me, arguments);
var ctor = function(){};
ctor.prototype = fn.prototype;
var obj = new ctor();
fn.apply(obj, arguments);
return obj;
};
})
'''
# Discover if an item is in an array.