New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@adraffy/ens-normalize

Package Overview
Dependencies
Maintainers
0
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adraffy/ens-normalize

Ethereum Name Service (ENS) Name Normalizer

1.11.0
latest
Source
npm
Version published
Weekly downloads
1.2M
-1.56%
Maintainers
0
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

ENS

FAQs

Package last updated on 14 Sep 2024

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