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

@accumulators/merkle-mountain-range

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accumulators/merkle-mountain-range - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0-alpha.0

lib/transient.d.ts

28

lib/draft.js

@@ -82,18 +82,14 @@ "use strict";

async getMany(idxs) {
const chunks = idxs.reduce((chunks, suffix) => {
const key = this.agnosticGetKey(suffix);
if (key.startsWith(this.key)) {
if (!chunks.length || chunks[chunks.length - 1].table === "parent")
chunks.push({ table: "self", keys: [] });
chunks[chunks.length - 1].keys.push(key);
}
else {
if (!chunks.length || chunks[chunks.length - 1].table === "self")
chunks.push({ table: "parent", keys: [] });
chunks[chunks.length - 1].keys.push(key);
}
return chunks;
}, []);
const keyed = await Promise.all(chunks.map(({ table, keys }) => (table === "self" ? this.store : this.parentTable.store).getMany(keys)));
const keyless = keyed
const keys = idxs.map((suffix) => this.agnosticGetKey(suffix));
const [thisTable, parentTable] = keys.reduce(([thisTable, parentTable], key) => {
if (key.startsWith(this.key))
thisTable.push(key);
else
parentTable.push(key);
return [thisTable, parentTable];
}, [[], []]);
const keyless = (await Promise.all([
thisTable.length ? this.store.getMany(thisTable) : Promise.resolve(new Map()),
parentTable.length ? this.parentTable.store.getMany(parentTable) : Promise.resolve(new Map()),
]))
.reduce((acc, map) => [...acc, ...map], [])

@@ -100,0 +96,0 @@ .reduce((acc, [key, value]) => acc.set(key.split(":").slice(2).join(":"), value), new Map());

{
"name": "@accumulators/merkle-mountain-range",
"version": "4.0.2",
"version": "4.1.0-alpha.0",
"description": "A TypeScript implementation of Merkle Mountain Ranges",

@@ -36,10 +36,10 @@ "keywords": [

"dependencies": {
"@accumulators/core": "^4.0.1",
"@accumulators/core": "^4.0.0",
"ulid": "^2.3.0"
},
"devDependencies": {
"@accumulators/hashers": "^4.0.1",
"@accumulators/memory": "^4.0.1"
"@accumulators/hashers": "^4.1.0-alpha.0",
"@accumulators/memory": "^4.0.0"
},
"gitHead": "827b393560007704bef578591fab9a56db1d1d70"
"gitHead": "dda00bf0d093363078e7d9f675476a6cca079454"
}

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