Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adraffy/ens-normalize

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adraffy/ens-normalize

Compact ES6 Ethereum Name Service (ENS) Name Normalizer

  • 1.3.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
997K
decreased by-3.12%
Maintainers
1
Weekly downloads
 
Created

What is @adraffy/ens-normalize?

@adraffy/ens-normalize is an npm package designed to normalize Ethereum Name Service (ENS) names. It ensures that ENS names are in a consistent format, which is crucial for avoiding ambiguities and ensuring compatibility across different systems.

What are @adraffy/ens-normalize's main functionalities?

Normalization

This feature allows you to normalize an ENS name to ensure it is in a consistent format. The code sample demonstrates how to normalize the ENS name 'example.eth'.

const { normalize } = require('@adraffy/ens-normalize');
const normalized = normalize('example.eth');
console.log(normalized);

Validation

This feature allows you to validate an ENS name to check if it conforms to the expected format. The code sample demonstrates how to validate the ENS name 'example.eth'.

const { validate } = require('@adraffy/ens-normalize');
const isValid = validate('example.eth');
console.log(isValid);

Unicode Handling

This feature allows you to convert Punycode-encoded ENS names to their Unicode equivalents. The code sample demonstrates how to convert the Punycode-encoded ENS name 'xn--exmple-cua.eth' to its Unicode equivalent.

const { toUnicode } = require('@adraffy/ens-normalize');
const unicodeName = toUnicode('xn--exmple-cua.eth');
console.log(unicodeName);

Other packages similar to @adraffy/ens-normalize

Keywords

FAQs

Package last updated on 05 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc