Created
September 28, 2012 00:12
-
-
Save juntalis/3797218 to your computer and use it in GitHub Desktop.
This file contains 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 characters
var $V = function() { | |
var args = Array.prototype.slice.call(arguments, 0); | |
if(!(this instanceof arguments.callee)) { | |
var $VA = arguments.callee, | |
$VB = function() {}, inst, ret; | |
$VB.prototype = $VA.prototype; | |
return Object(ret = $VA.apply(inst = new $VA, args)) === ret ? ret : inst; | |
} | |
this.originalValue = (function(a) { | |
switch(a.length) { | |
case 0: return undefined; | |
case 1: return a[0]; | |
default: return a; | |
} | |
})(args); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment