2 * Encodes all non-ASCII characters, as well as characters not valid in XML
3 * documents using XML entities.
5 * If a character has no equivalent entity, a
6 * numeric hexadecimal reference (eg. `ü`) will be used.
8 export declare const encodeXML: (data: string) => string;
10 * Encodes all entities and non-ASCII characters in the input.
12 * This includes characters that are valid ASCII characters in HTML documents.
13 * For example `#` will be encoded as `#`. To get a more compact output,
14 * consider using the `encodeNonAsciiHTML` function.
16 * If a character has no equivalent entity, a
17 * numeric hexadecimal reference (eg. `ü`) will be used.
19 export declare const encodeHTML: (data: string) => string;
21 * Encodes all non-ASCII characters, as well as characters not valid in HTML
22 * documents using HTML entities.
24 * If a character has no equivalent entity, a
25 * numeric hexadecimal reference (eg. `ü`) will be used.
27 export declare const encodeNonAsciiHTML: (data: string) => string;
29 * Encodes all non-ASCII characters, as well as characters not valid in XML
30 * documents using numeric hexadecimal reference (eg. `ü`).
32 * Have a look at `escapeUTF8` if you want a more concise output at the expense
33 * of reduced transportability.
35 * @param data String to escape.
37 export declare function escape(data: string): string;
39 * Encodes all characters not valid in XML documents using numeric hexadecimal
40 * reference (eg. `ü`).
42 * Note that the output will be character-set dependent.
44 * @param data String to escape.
46 export declare function escapeUTF8(data: string): string;
47 //# sourceMappingURL=encode.d.ts.map