New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ulixee/commons

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ulixee/commons - npm Package Compare versions

Comparing version 2.0.0-alpha.10 to 2.0.0-alpha.11

lib/envUtils.d.ts

1

lib/hashUtils.d.ts
/// <reference types="node" />
export declare const hashMessagePrefix = "\u0018Ulixee Signed Message:\n";
export declare function sha3(data: Buffer | string): Buffer;

@@ -3,0 +4,0 @@ export declare function sortedJsonStringify<T>(obj: T | null, ignoreProperties?: (keyof T)[]): string;

5

lib/hashUtils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hashObject = exports.sortedJsonStringify = exports.sha3 = void 0;
exports.hashObject = exports.sortedJsonStringify = exports.sha3 = exports.hashMessagePrefix = void 0;
const crypto_1 = require("crypto");
const TypeSerializer_1 = require("./TypeSerializer");
exports.hashMessagePrefix = '\x18Ulixee Signed Message:\n';
function sha3(data) {

@@ -23,3 +24,3 @@ return (0, crypto_1.createHash)('sha3-256').update(data).digest();

const json = sortedJsonStringify(obj, options?.ignoreProperties);
let buffer = Buffer.from(json);
let buffer = Buffer.from(`${exports.hashMessagePrefix}${json.length}${json}`);
if (options?.prefix)

@@ -26,0 +27,0 @@ buffer = Buffer.concat([options.prefix, buffer]);

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

static replace(object, options) {
if (!object)
if (object === undefined || object === null)
return object;

@@ -59,0 +59,0 @@ const replaced = this.replacer(null, object);

{
"name": "@ulixee/commons",
"version": "2.0.0-alpha.10",
"version": "2.0.0-alpha.11",
"description": "Common utilities for Ulixee",

@@ -19,3 +19,3 @@ "license": "MIT",

},
"gitHead": "b8c2419605a7e1558fa442247834d2daf60fdb06"
"gitHead": "64ca2766fa3d206479dc8bfb3e887e8b133ee8b5"
}

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