| 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){ |
| 2403 | var binary = false; |
| 2404 | switch(it.charCodeAt(1)){ |
| 2405 | case 66 : case 98 : binary = true; |
| 2406 | case 79 : case 111 : return parseInt(it.slice(2), binary ? 2 : 8); |
| 2407 | } |
| 2408 | } return +it; |
| 2409 | }; |
| 2410 | if(!($Number('0o1') && $Number('0b1'))){ |
| 2411 | $Number = function Number(it){ |
| 2412 | var that = this; |