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

@trivikr-test/util-hex-encoding

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trivikr-test/util-hex-encoding - npm Package Compare versions

Comparing version 3.58.0 to 3.170.0-es2015

22

dist-es/index.js

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

var SHORT_TO_HEX = {};
var HEX_TO_SHORT = {};
for (var i = 0; i < 256; i++) {
var encodedByte = i.toString(16).toLowerCase();
const SHORT_TO_HEX = {};
const HEX_TO_SHORT = {};
for (let i = 0; i < 256; i++) {
let encodedByte = i.toString(16).toLowerCase();
if (encodedByte.length === 1) {
encodedByte = "0".concat(encodedByte);
encodedByte = `0${encodedByte}`;
}

@@ -15,5 +15,5 @@ SHORT_TO_HEX[i] = encodedByte;

}
var out = new Uint8Array(encoded.length / 2);
for (var i = 0; i < encoded.length; i += 2) {
var encodedByte = encoded.slice(i, i + 2).toLowerCase();
const out = new Uint8Array(encoded.length / 2);
for (let i = 0; i < encoded.length; i += 2) {
const encodedByte = encoded.slice(i, i + 2).toLowerCase();
if (encodedByte in HEX_TO_SHORT) {

@@ -23,3 +23,3 @@ out[i / 2] = HEX_TO_SHORT[encodedByte];

else {
throw new Error("Cannot decode unrecognized sequence ".concat(encodedByte, " as hexadecimal"));
throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
}

@@ -30,4 +30,4 @@ }

export function toHex(bytes) {
var out = "";
for (var i = 0; i < bytes.byteLength; i++) {
let out = "";
for (let i = 0; i < bytes.byteLength; i++) {
out += SHORT_TO_HEX[bytes[i]];

@@ -34,0 +34,0 @@ }

@@ -1,4 +0,3 @@

export declare function fromHex(encoded: string): Uint8Array;
export declare function toHex(bytes: Uint8Array): string;
{
"name": "@trivikr-test/util-hex-encoding",
"version": "3.58.0",
"version": "3.170.0-es2015",
"description": "Converts binary buffers to and from lowercase hexadecimal encoding",

@@ -9,2 +9,3 @@ "scripts": {

"build:es": "tsc -p tsconfig.es.json",
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
"build:types": "tsc -p tsconfig.types.json",

@@ -48,3 +49,3 @@ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",

"concurrently": "7.0.0",
"downlevel-dts": "0.7.0",
"downlevel-dts": "0.10.1",
"rimraf": "3.0.2",

@@ -51,0 +52,0 @@ "typedoc": "0.19.2",

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

# @aws-sdk/util-hex-encoding
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-hex-encoding/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-hex-encoding)
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-hex-encoding.svg)](https://www.npmjs.com/package/@aws-sdk/util-hex-encoding)
Please refer [README.md](https://github.com/aws/aws-sdk-js-v3/blob/v3.170.0/packages/util-hex-encoding/README.md) for v3.170.0.
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