|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
971 bytes
|
| Line | |
|---|
| 1 | export type Level = 'xml' | 'html4' | 'html5' | 'all';
|
|---|
| 2 | interface CommonOptions {
|
|---|
| 3 | level?: Level;
|
|---|
| 4 | }
|
|---|
| 5 | export type EncodeMode = 'specialChars' | 'nonAscii' | 'nonAsciiPrintable' | 'nonAsciiPrintableOnly' | 'extensive';
|
|---|
| 6 | export interface EncodeOptions extends CommonOptions {
|
|---|
| 7 | mode?: EncodeMode;
|
|---|
| 8 | numeric?: 'decimal' | 'hexadecimal';
|
|---|
| 9 | }
|
|---|
| 10 | export type DecodeScope = 'strict' | 'body' | 'attribute';
|
|---|
| 11 | export interface DecodeOptions extends CommonOptions {
|
|---|
| 12 | scope?: DecodeScope;
|
|---|
| 13 | }
|
|---|
| 14 | /** Encodes all the necessary (specified by `level`) characters in the text */
|
|---|
| 15 | export declare function encode(text: string | undefined | null, { mode, numeric, level }?: EncodeOptions): string;
|
|---|
| 16 | /** Decodes a single entity */
|
|---|
| 17 | export declare function decodeEntity(entity: string | undefined | null, { level }?: CommonOptions): string;
|
|---|
| 18 | /** Decodes all entities in the text */
|
|---|
| 19 | export declare function decode(text: string | undefined | null, { level, scope }?: DecodeOptions): string;
|
|---|
| 20 | export {};
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.