1 var $export = require('./_export')
2 , toIndex = require('./_to-index')
3 , fromCharCode = String.fromCharCode
4 , $fromCodePoint = String.fromCodePoint;
6 // length should be 1, old FF problem
7 $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
8 // 21.1.2.2 String.fromCodePoint(...codePoints)
9 fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
11 , aLen = arguments.length
15 code = +arguments[i++];
16 if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
17 res.push(code < 0x10000
19 : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
21 } return res.join('');