Socket
Socket
Sign inDemoInstall

record-cache

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

record-cache - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

index.js

@@ -12,3 +12,3 @@ var EMPTY = []

var k = toString(record)
var r = this.map.get(record)
var r = this.map.get(k)
if (r) return false

@@ -24,3 +24,3 @@

var k = toString(record)
var r = this.map.get(record)
var r = this.map.get(k)
if (!r) return false

@@ -27,0 +27,0 @@

{
"name": "record-cache",
"version": "1.0.1",
"version": "1.0.2",
"description": "Cache optimised for record like things",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -166,1 +166,21 @@ var tape = require('tape')

})
tape('add dedups buffers', function (t) {
var rc = recordCache()
rc.add('hello', Buffer.from('world'))
rc.add('hello', Buffer.from('world'))
t.same(rc.get('hello'), [Buffer.from('world')])
t.end()
})
tape('add and remove buffer', function (t) {
var rc = recordCache()
rc.add('hello', Buffer.from('world'))
rc.remove('hello', Buffer.from('world'))
t.same(rc.get('hello'), [])
t.end()
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc