2.2.8 • Published 6 months ago

@types/ent v2.2.8

Weekly downloads
17,695
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/ent

Summary

This package contains type definitions for ent (https://github.com/substack/node-ent).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ent.

index.d.ts

// Type definitions for ent 2.2.0
// Project: https://github.com/substack/node-ent
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * Options for the encode() function
 */
export interface EntOpts {
    /**
     * If opts.numeric is false or opts.named is true, encoding will used named codes like &pi;.
     */
    numeric?: boolean | undefined;

    /**
     * If opts.numeric is false or opts.named is true, encoding will used named codes like &pi;.
     */
    named?: boolean | undefined;
    
    /**
     * If opts.special is set to an Object, the key names will be forced to be encoded (defaults to forcing: <>'"&)
     */
    special?: any;
}

/**
 * Escape unsafe characters in str with html entities. By default, entities are encoded with numeric decimal codes
 */
export function encode(s: string, opts?: EntOpts): string;

/**
 * Convert html entities in str back to raw text.
 */
export function decode(s: string): string;

Additional Details

  • Last updated: Fri, 09 Jul 2021 02:32:25 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Rogier Schouten.

2.2.7

7 months ago

2.2.6

8 months ago

2.2.8

6 months ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.3

4 years ago

2.2.2

4 years ago

2.2.1

8 years ago