punycode.ucs2.encode(codePoints)


punycode.ucs2.encode() 方法返回基于数字代码点值数组的字符串。

punycode.ucs2.encode([0x61, 0x62, 0x63]); // 'abc'
punycode.ucs2.encode([0x1D306]); // '\uD834\uDF06'

The punycode.ucs2.encode() method returns a string based on an array of numeric code point values.

punycode.ucs2.encode([0x61, 0x62, 0x63]); // 'abc'
punycode.ucs2.encode([0x1D306]); // '\uD834\uDF06'