@types/ent
TypeScript icon, indicating that this package has built-in type declarations

2.2.8 • Public • Published

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

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

    /**
     * If opts.numeric is false or opts.named is true, encoding will used named codes like π.
     */
    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: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Rogier Schouten.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ent

Weekly Downloads

4,988

Version

2.2.8

License

MIT

Unpacked Size

4.12 kB

Total Files

5

Last publish

Collaborators

  • types