@types/tr46
TypeScript definitions for tr46
Last updated a year ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/tr46 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/tr46

Summary

This package contains type definitions for tr46 (https://github.com/jsdom/tr46).

Details

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

index.d.ts

/**
 * Converts a string of Unicode symbols to a case-folded Punycode string of ASCII symbols.
 */
export function toASCII(
    domainName: string,
    options?: ToASCIIOptions,
): string | null;

/**
 * Converts a case-folded Punycode string of ASCII symbols to a string of Unicode symbols.
 */
export function toUnicode(
    domainName: string,
    options?: Options,
): { domain: string; error: boolean };

export interface Options {
    /**
     * When set to `true`, any bi-directional text within the input will be checked for validation.
     * @default false
     */
    checkBidi?: boolean | undefined;
    /**
     * When set to `true`, the positions of any hyphen characters within the input will be checked for validation.
     * @default false
     */
    checkHyphens?: boolean | undefined;
    /**
     * When set to `true`, any word joiner characters within the input will be checked for validation.
     * @default false
     */
    checkJoiners?: boolean | undefined;
    /**
     * When set to `true`, invalid Punycode strings within the input will be allowed.
     * @default false
     */
    ignoreInvalidPunycode?: boolean | undefined;
    /**
     * When set to `true`, uses transitional (compatibility) processing of the deviation characters.
     * @default false
     */
    transitionalProcessing?: boolean | undefined;
    /**
     * When set to `true`, input will be validated according to [STD3 Rules](http://unicode.org/reports/tr46/#STD3_Rules).
     * @default false
     */
    useSTD3ASCIIRules?: boolean | undefined;
}

export interface ToASCIIOptions extends Options {
    /**
     * When set to `true`, the length of each DNS label within the input will be checked for validation.
     * @default false
     */
    verifyDNSLength?: boolean | undefined;
}

Additional Details

  • Last updated: Wed, 29 Jan 2025 02:01:16 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender.

Current Tags

  • 5.0.1                                ...           latest (a year ago)
  • 3.0.0                                ...           ts4.0 (4 years ago)
  • 3.0.0                                ...           ts4.1 (4 years ago)
  • 3.0.0                                ...           ts4.2 (4 years ago)
  • 3.0.1                                ...           ts4.3 (3 years ago)
  • 3.0.1                                ...           ts4.4 (3 years ago)
  • 3.0.3                                ...           ts4.5 (2 years ago)
  • 5.0.0                                ...           ts4.6 (2 years ago)
  • 5.0.0                                ...           ts4.7 (2 years ago)
  • 5.0.0                                ...           ts4.8 (2 years ago)
  • 5.0.0                                ...           ts4.9 (2 years ago)
  • 5.0.1                                ...           ts5.0 (a year ago)
  • 5.0.1                                ...           ts5.1 (a year ago)
  • 5.0.1                                ...           ts5.2 (a year ago)
  • 5.0.1                                ...           ts5.3 (a year ago)
  • 5.0.1                                ...           ts5.4 (a year ago)
  • 5.0.1                                ...           ts5.5 (a year ago)
  • 5.0.1                                ...           ts5.6 (a year ago)
  • 5.0.1                                ...           ts5.7 (a year ago)
  • 5.0.1                                ...           ts5.8 (a year ago)
  • 5.0.1                                ...           ts5.9 (a year ago)

6 Versions

  • 5.0.1                                ...           a year ago
  • 5.0.0                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |