Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

tr46

Package Overview
Dependencies
1
Maintainers
6
Versions
10
Issues
File Explorer

Advanced tools

tr46

An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing

    3.0.0latest

Version published
Maintainers
6
Weekly downloads
48,161,755
increased by0.58%

Weekly downloads

Changelog

Source

Version 3.0.0

Raise Node.js minimum version to v12.x.

This version brings support for Unicode 14.0.0.

Readme

Source

tr46

An JavaScript implementation of Unicode Technical Standard #46: Unicode IDNA Compatibility Processing.

Installation

Node.js ≥ 12 is required. To install, type this at the command line:

npm install tr46 # or yarn add tr46

API

toASCII(domainName[, options])

Converts a string of Unicode symbols to a case-folded Punycode string of ASCII symbols.

Available options:

toUnicode(domainName[, options])

Converts a case-folded Punycode string of ASCII symbols to a string of Unicode symbols.

Available options:

Options

checkBidi

Type: boolean Default value: false When set to true, any bi-directional text within the input will be checked for validation.

checkHyphens

Type: boolean Default value: false When set to true, the positions of any hyphen characters within the input will be checked for validation.

checkJoiners

Type: boolean Default value: false When set to true, any word joiner characters within the input will be checked for validation.

processingOption

Type: string Default value: "nontransitional" When set to "transitional", symbols within the input will be validated according to the older IDNA2003 protocol. When set to "nontransitional", the current IDNA2008 protocol will be used.

useSTD3ASCIIRules

Type: boolean Default value: false When set to true, input will be validated according to STD3 Rules.

verifyDNSLength

Type: boolean Default value: false When set to true, the length of each DNS label within the input will be checked for validation.

Keywords

FAQs

What is tr46?

An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing

Is tr46 popular?

The npm package tr46 receives a total of 39,214,841 weekly downloads. As such, tr46 popularity was classified as popular.

Is tr46 well maintained?

We found that tr46 demonstrated a healthy version release cadence and project activity. It has 6 open source maintainers collaborating on the project.

Last updated on 03 Oct 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc