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

@iota/converter

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iota/converter - npm Package Compare versions

Comparing version 1.0.0-beta.11 to 1.0.0-beta.12

.nyc_output/1fc77773-cc70-4d51-880a-beaa49550b1d.json

2

out/src/index.js

@@ -9,2 +9,4 @@ "use strict";

__export(require("./trits"));
exports.bytesToTrits = function (bytes) { return Int8Array.from(bytes); };
exports.tritsToBytes = function (trits) { return Buffer.from(trits.buffer); };
//# sourceMappingURL=index.js.map

@@ -58,2 +58,5 @@ "use strict";

var index = exports.TRYTE_ALPHABET.indexOf(input.charAt(i));
if (index === -1) {
throw new Error(errors.INVALID_TRYTES);
}
result[i * 3] = exports.TRYTES_TRITS_LUT[index][0];

@@ -60,0 +63,0 @@ result[i * 3 + 1] = exports.TRYTES_TRITS_LUT[index][1];

5

package.json
{
"name": "@iota/converter",
"version": "1.0.0-beta.11",
"version": "1.0.0-beta.12",
"description": "Convert values & trytes to trits and back",

@@ -65,3 +65,4 @@ "main": "./out/src/index.js",

"url": "https://github.com/iotaledger/iota.js.git/tree/develop/packages/crypto"
}
},
"gitHead": "0777d33f7a01a2751b570774e917ce5e2485cd40"
}
/** @module converter */
export * from './ascii'
export * from './trits'
export const bytesToTrits = (bytes: Buffer) => Int8Array.from(bytes)
export const tritsToBytes = (trits: Int8Array) => Buffer.from(trits.buffer)

@@ -61,2 +61,6 @@ import * as errors from './errors'

if (index === -1) {
throw new Error(errors.INVALID_TRYTES)
}
result[i * 3] = TRYTES_TRITS_LUT[index][0]

@@ -63,0 +67,0 @@ result[i * 3 + 1] = TRYTES_TRITS_LUT[index][1]

@@ -0,3 +1,6 @@

/// <reference types="node" />
/** @module converter */
export * from './ascii';
export * from './trits';
export declare const bytesToTrits: (bytes: Buffer) => Int8Array;
export declare const tritsToBytes: (trits: Int8Array) => Buffer;

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