Socket
Socket
Sign inDemoInstall

@ethersproject/strings

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/strings - npm Package Compare versions

Comparing version 5.4.0 to 5.5.0

2

lib.esm/_version.d.ts

@@ -1,2 +0,2 @@

export declare const version = "strings/5.4.0";
export declare const version = "strings/5.5.0";
//# sourceMappingURL=_version.d.ts.map

@@ -1,2 +0,2 @@

export const version = "strings/5.4.0";
export const version = "strings/5.5.0";
//# sourceMappingURL=_version.js.map

@@ -38,3 +38,3 @@ "use strict";

Utf8ErrorReason["UTF16_SURROGATE"] = "UTF-16 surrogate";
// The string is an overlong reperesentation
// The string is an overlong representation
// - offset = start of this codepoint

@@ -147,3 +147,3 @@ // - badCodepoint = the computed codepoint; already bounds checked

}
// See above loop for invalid contimuation byte
// See above loop for invalid continuation byte
if (res === null) {

@@ -150,0 +150,0 @@ continue;

@@ -1,2 +0,2 @@

export declare const version = "strings/5.4.0";
export declare const version = "strings/5.5.0";
//# sourceMappingURL=_version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "strings/5.4.0";
exports.version = "strings/5.5.0";
//# sourceMappingURL=_version.js.map

@@ -9,3 +9,3 @@ "use strict";

// Get the bytes
var bytes = utf8_1.toUtf8Bytes(text);
var bytes = (0, utf8_1.toUtf8Bytes)(text);
// Check we have room for null-termination

@@ -16,7 +16,7 @@ if (bytes.length > 31) {

// Zero-pad (implicitly null-terminates)
return bytes_1.hexlify(bytes_1.concat([bytes, constants_1.HashZero]).slice(0, 32));
return (0, bytes_1.hexlify)((0, bytes_1.concat)([bytes, constants_1.HashZero]).slice(0, 32));
}
exports.formatBytes32String = formatBytes32String;
function parseBytes32String(bytes) {
var data = bytes_1.arrayify(bytes);
var data = (0, bytes_1.arrayify)(bytes);
// Must be 32 bytes with a null-termination

@@ -35,5 +35,5 @@ if (data.length !== 32) {

// Determine the string value
return utf8_1.toUtf8String(data.slice(0, length));
return (0, utf8_1.toUtf8String)(data.slice(0, length));
}
exports.parseBytes32String = parseBytes32String;
//# sourceMappingURL=bytes32.js.map

@@ -150,3 +150,3 @@ "use strict";

// Get the code points (keeping the current normalization)
var codes = utf8_1.toUtf8CodePoints(value);
var codes = (0, utf8_1.toUtf8CodePoints)(value);
codes = flatten(codes.map(function (code) {

@@ -169,3 +169,3 @@ // Substitute Table B.1 (Maps to Nothing)

// Normalize using form KC
codes = utf8_1.toUtf8CodePoints(utf8_1._toUtf8String(codes), utf8_1.UnicodeNormalizationForm.NFKC);
codes = (0, utf8_1.toUtf8CodePoints)((0, utf8_1._toUtf8String)(codes), utf8_1.UnicodeNormalizationForm.NFKC);
// Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9

@@ -184,3 +184,3 @@ codes.forEach(function (code) {

// IDNA extras
var name = utf8_1._toUtf8String(codes);
var name = (0, utf8_1._toUtf8String)(codes);
// IDNA: 4.2.3.1

@@ -187,0 +187,0 @@ if (name.substring(0, 1) === "-" || name.substring(2, 4) === "--" || name.substring(name.length - 1) === "-") {

@@ -40,3 +40,3 @@ "use strict";

Utf8ErrorReason["UTF16_SURROGATE"] = "UTF-16 surrogate";
// The string is an overlong reperesentation
// The string is an overlong representation
// - offset = start of this codepoint

@@ -92,3 +92,3 @@ // - badCodepoint = the computed codepoint; already bounds checked

}
bytes = bytes_1.arrayify(bytes);
bytes = (0, bytes_1.arrayify)(bytes);
var result = [];

@@ -150,3 +150,3 @@ var i = 0;

}
// See above loop for invalid contimuation byte
// See above loop for invalid continuation byte
if (res === null) {

@@ -210,3 +210,3 @@ continue;

}
return bytes_1.arrayify(result);
return (0, bytes_1.arrayify)(result);
}

@@ -213,0 +213,0 @@ exports.toUtf8Bytes = toUtf8Bytes;

{
"author": "Richard Moore <me@ricmoo.com>",
"dependencies": {
"@ethersproject/bytes": "^5.4.0",
"@ethersproject/constants": "^5.4.0",
"@ethersproject/logger": "^5.4.0"
"@ethersproject/bytes": "^5.5.0",
"@ethersproject/constants": "^5.5.0",
"@ethersproject/logger": "^5.5.0"
},

@@ -20,3 +20,3 @@ "description": "String utility functions.",

],
"gitHead": "c2c0ce75039e7256b287f9a764188d08ed0b7296",
"gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0",
"keywords": [

@@ -44,5 +44,5 @@ "Ethereum",

"sideEffects": false,
"tarballHash": "0x3f861b14acc970cf2990a9db130da864200a9b2f45c4ba8b75fb5f305d767b29",
"tarballHash": "0xf21979740bced4ac1b76c72b037dea706dd7b0805449756a938f19d19f940a0c",
"types": "./lib/index.d.ts",
"version": "5.4.0"
"version": "5.5.0"
}

@@ -1,1 +0,1 @@

export const version = "strings/5.4.0";
export const version = "strings/5.5.0";

@@ -46,3 +46,3 @@ "use strict";

// The string is an overlong reperesentation
// The string is an overlong representation
// - offset = start of this codepoint

@@ -175,3 +175,3 @@ // - badCodepoint = the computed codepoint; already bounds checked

// See above loop for invalid contimuation byte
// See above loop for invalid continuation byte
if (res === null) { continue; }

@@ -178,0 +178,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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