@truffle/dashboard-message-bus-common
Advanced tools
Comparing version 0.1.1 to 0.1.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createMessage = exports.base64ToJson = exports.jsonToBase64 = void 0; | ||
const buffer_1 = require("buffer"); | ||
/** | ||
@@ -9,3 +10,3 @@ * Convert any JS object or value to a base64 representation of it | ||
const stringifiedJson = JSON.stringify(json); | ||
const buffer = Buffer.from(stringifiedJson); | ||
const buffer = buffer_1.Buffer.from(stringifiedJson); | ||
const base64 = buffer.toString("base64"); | ||
@@ -20,3 +21,3 @@ return base64; | ||
const base64ToJson = (base64) => { | ||
const buffer = Buffer.from(base64, "base64"); | ||
const buffer = buffer_1.Buffer.from(base64, "base64"); | ||
const stringifiedJson = buffer.toString("utf8"); | ||
@@ -23,0 +24,0 @@ const json = JSON.parse(stringifiedJson); |
{ | ||
"name": "@truffle/dashboard-message-bus-common", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Message types that are used when communicating with the Truffle dashboard message bus", | ||
@@ -35,3 +35,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "d30ce8fcd3a84044c04ac7466d4b3be2b4e8ae48" | ||
"gitHead": "76fec0004b4cdba773dc131044977f1e2efbf9fc" | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11123
150
0