Last active
August 29, 2015 13:59
Revisions
-
neall revised this gist
Apr 14, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,9 @@ Object.defineProperty(Object.prototype, 'methToFunc', { var method = this[methodName]; if (typeof method === 'function') { var curryArgs = [].slice.call(arguments, 1); var that = this; return function() { return method.apply(that, curryArgs.concat(arguments)); }; } else { return function() { -
neall created this gist
Apr 14, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ Object.defineProperty(Object.prototype, 'methToFunc', { value: function(methodName) { var method = this[methodName]; if (typeof method === 'function') { var curryArgs = [].slice.call(arguments, 1); return function() { return method.apply(this, curryArgs.concat(arguments)); }; } else { return function() { return method; }; } } });