(toString)
| 324 | } |
| 325 | } |
| 326 | function createPointAt(toString){ |
| 327 | return function(pos){ |
| 328 | var s = String(assertDefined(this)) |
| 329 | , i = toInteger(pos) |
| 330 | , l = s.length |
| 331 | , a, b; |
| 332 | if(i < 0 || i >= l)return toString ? '' : undefined; |
| 333 | a = s.charCodeAt(i); |
| 334 | return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff |
| 335 | ? toString ? s.charAt(i) : a |
| 336 | : toString ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | // Assertion & errors |
| 341 | var REDUCE_ERROR = 'Reduce of empty object with no initial value'; |
no test coverage detected