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
function both( val ){ | |
if(typeof val == 'object') { | |
return val; | |
} else if(typeof val == 'function') { | |
var val = val(); | |
return typeof val == 'object' ? val : { top: val, left:val }; | |
} else { | |
return typeof val == 'object' ? val : { top:val, left:val }; | |
} | |
}; |