| 2392 | // Opera ~12 has broken Object#toString |
| 2393 | , BROKEN_COF = cof($.create(proto)) == NUMBER; |
| 2394 | var toPrimitive = function(it){ |
| 2395 | var fn, val; |
| 2396 | if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; |
| 2397 | if(typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; |
| 2398 | throw TypeError("Can't convert object to number"); |
| 2399 | }; |
| 2400 | var toNumber = function(it){ |
| 2401 | if(isObject(it))it = toPrimitive(it); |
| 2402 | if(typeof it == 'string' && it.length > 2 && it.charCodeAt(0) == 48){ |