refactor(util) getType

This commit is contained in:
coderaiser 2014-05-28 08:40:41 -04:00
parent 412f57e982
commit ccca0ca8f2

View file

@ -619,9 +619,7 @@
*/
this.getType = function(variable) {
var regExp = new RegExp('\\s([a-zA-Z]+)'),
obj = {},
toStr = obj.toString,
str = toStr.call(variable),
str = {}.toString.call(variable),
typeBig = str.match(regExp)[1],
type = typeBig.toLowerCase();