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

hamt_plus

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hamt_plus - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

31

dist_node/hamt.js

@@ -171,8 +171,10 @@ /*

(Collision.prototype.lookup = (function(eq, _, h, k) {
var self = this;
if ((h === self.hash)) {
for (var i = 0, len = self.children.length;
var __o = this,
hash0 = __o["hash"],
children = __o["children"];
if ((h === hash0)) {
for (var i = 0, len = children.length;
(i < len);
(i = (i + 1))) {
var child = self.children[i];
var child = children[i];
if (eq(child.key, k)) return child.value;

@@ -184,13 +186,16 @@ }

(IndexedNode.prototype.lookup = (function(eq, shift, h, k) {
var self = this,
var __o = this,
children = __o["children"],
mask0 = __o["mask"],
frag = ((h >>> shift) & mask),
bit = (1 << frag),
bitmap;
return ((self.mask & bit) ? lookup(eq, self.children[((bitmap = self.mask), popcount((bitmap & (bit - 1))))], (
shift + 5), h, k) : nothing);
return ((mask0 & bit) ? lookup(eq, children[((bitmap = mask0), popcount((bitmap & (bit - 1))))], (shift + 5),
h, k) : nothing);
}));
(ArrayNode.prototype.lookup = (function(eq, shift, h, k) {
var self = this,
var __o = this,
children = __o["children"],
frag = ((h >>> shift) & mask),
child = self.children[frag];
child = children[frag];
return lookup(eq, child, (shift + 5), h, k);

@@ -218,4 +223,8 @@ }));

(Collision.prototype.modify = (function(mutate0, eq, edit, shift, f, h, k) {
var self = this,
list = modifyCollisionList((mutate0 && (edit === self.edit)), eq, edit, h, self.children, f, k);
var self = this;
if ((self.hash !== h)) {
var v = f();
return ((nothing === v) ? self : mergeLeaves(edit, shift, self, new(Leaf)(edit, h, k, v)));
}
var list = modifyCollisionList((mutate0 && (edit === self.edit)), eq, edit, h, self.children, f, k);
if ((list.length <= 1)) return list[0];

@@ -222,0 +231,0 @@ return ((mutate0 && (edit === self.edit)) ? self : new(Collision)(edit, h, list));

{
"name": "hamt_plus",
"version": "0.0.5",
"version": "0.0.6",
"description": "Fork of HAMT that adds transient mutation and support for custom key types",

@@ -5,0 +5,0 @@ "keywords": [

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