16 lines
628 B
TypeScript
16 lines
628 B
TypeScript
/**
|
|
* taken from punycode@2.1.0
|
|
*
|
|
* Creates an array containing the numeric code points of each Unicode
|
|
* character in the string. While JavaScript uses UCS-2 internally,
|
|
* this function will convert a pair of surrogate halves (each of which
|
|
* UCS-2 exposes as separate characters) into a single code point,
|
|
* matching UTF-16.
|
|
* @see `punycode.ucs2.encode`
|
|
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
* @memberOf punycode.ucs2
|
|
* @name decode
|
|
* @param string The Unicode input string (UCS-2).
|
|
* @returns The new array of code points.
|
|
*/
|
|
export default function ucs2decode(string: string): string[];
|