@ccms/nodejs
Version:
MiaoScript nodejs package
40 lines • 1.37 kB
TypeScript
/**
* 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} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
declare function ucs2decode(string: any): any[];
/** Define the public API */
declare const punycode: {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
version: string;
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
ucs2: {
decode: typeof ucs2decode;
encode: (array: any) => string;
};
decode: (input: any) => string;
encode: (input: any) => string;
toASCII: (input: any) => string;
toUnicode: (input: any) => string;
};
export = punycode;
//# sourceMappingURL=index.d.ts.map