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 - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

19

ens-normalize.js

@@ -41,10 +41,10 @@ function bytes_from_base64(s) {

this.pos += 2;
return 0x80 + ((x0 & 0x7F) << 8) + table[pos+1];
return 0x80 + (((x0 & 0x7F) << 8) | table[pos+1]);
}
this.pos += 4;
return 0x7F80 + (table[pos+1] << 16) + (table[pos+2] << 8) + table[pos+3];
return 0x7F80 + ((table[pos+1] << 16) | (table[pos+2] << 8) | table[pos+3]);
}
read_signed() { // eg. [0,1,2,3...] => [0,-1,1,-2,...]
let i = this.read();
return (i & 1) ? -(i >> 1) : (i >> 1);
return (i & 1) ? -((i + 1) >> 1) : (i >> 1);
}

@@ -99,3 +99,4 @@ }

let r = new TableReader(table);
while (r.more) {
let i = 0;
while (r.more) {
x += r.read();

@@ -112,3 +113,3 @@ if (x > cp) break;

y += r.read_signed();
}
}
}

@@ -200,5 +201,5 @@ }

if (mapped) return mapped;
for (let i = 0; i < TABLE_W.length; i++) {
for (let i = 0; i < TABLE_W.length; i++) {
mapped = lookup_mapped(TABLE_W[i], i + 1, cp);
if (mapped) return mapped;
if (mapped) return mapped;
}

@@ -235,3 +236,5 @@ }

} else if (cp === 0x200D) { // https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.2
if (i > 0 && lookup_member(TABLE_V, v[i - 1])) { // Virama
// rule 1: V + cp
// V = Combining_Class "Virama"
if (i > 0 && lookup_member(TABLE_V, v[i - 1])) {
return String.fromCodePoint(cp);

@@ -238,0 +241,0 @@ }

{
"name": "@adraffy/ens-normalize",
"version": "1.0.3",
"version": "1.0.4",
"description": "Compact ES6 Ethereum Name Service (ENS) Name Normalizer",

@@ -5,0 +5,0 @@ "keywords": ["ENS", "Ethereum", "UTS-46", "IDNA2008"],

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