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

random-access-storage

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-access-storage - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

2

index.js

@@ -31,3 +31,3 @@ const EventEmitter = require('events')

this._needsOpen = true
this._needsCreate = false
this._needsCreate = !!opts.createAlways

@@ -34,0 +34,0 @@ this.opened = false

{
"name": "random-access-storage",
"version": "2.0.1",
"version": "2.1.0",
"description": "Easily make random-access-storage instances",

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

@@ -64,4 +64,4 @@ # random-access-storage

{
createAlways: false, // always create storage on first open
open: fn, // sets ._open
openReadonly: fn, // sets ._openReadonly
read: fn, // sets ._read

@@ -68,0 +68,0 @@ write: fn, // sets ._write

@@ -485,1 +485,16 @@ const test = require('brittle')

})
test('create always', function (t) {
t.plan(1)
const s = new RAS({
createAlways: true,
open: function (req) {
t.ok(req.create)
req.callback(null)
}
})
s.open()
})
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