1 | export declare type Level = 'xml' | 'html4' | 'html5' | 'all';
|
2 | interface CommonOptions {
|
3 | level?: Level;
|
4 | }
|
5 | export declare type EncodeMode = 'specialChars' | 'nonAscii' | 'nonAsciiPrintable' | 'extensive';
|
6 | export interface EncodeOptions extends CommonOptions {
|
7 | mode?: EncodeMode;
|
8 | numeric?: 'decimal' | 'hexadecimal';
|
9 | }
|
10 | export declare type DecodeScope = 'strict' | 'body' | 'attribute';
|
11 | export interface DecodeOptions extends CommonOptions {
|
12 | scope?: DecodeScope;
|
13 | }
|
14 |
|
15 | export declare function encode(text: string | undefined | null, { mode, numeric, level }?: EncodeOptions): string;
|
16 |
|
17 | export declare function decodeEntity(entity: string | undefined | null, { level }?: CommonOptions): string;
|
18 |
|
19 | export declare function decode(text: string | undefined | null, { level, scope }?: DecodeOptions): string;
|
20 | export {};
|