Socket
Socket
Sign inDemoInstall

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 3.0.0 to 3.0.1

4

index.js

@@ -235,4 +235,4 @@ const EventEmitter = require('events')

const ra = this.storage
if (ra.opened && !ra.closed) return true
if (!ra.opened) nextTick(this, this._openError || new Error('Not opened'))
if (ra.opened && !ra.closed && !ra.suspended) return true
if (!ra.opened || ra.suspended) nextTick(this, this._openError || new Error('Not opened'))
else if (ra.closed) nextTick(this, new Error('Closed'))

@@ -239,0 +239,0 @@ return false

{
"name": "random-access-storage",
"version": "3.0.0",
"version": "3.0.1",
"description": "Easily make random-access-storage instances",

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

@@ -73,3 +73,3 @@ # random-access-storage

close: fn, // sets ._close
destroy: fn // sets ._destroy
unlink: fn // sets ._unlink
}

@@ -102,6 +102,2 @@ ```

#### `storage.suspendable`
True if the storage implements `._suspend`.
#### `storage.closed`

@@ -111,6 +107,10 @@

#### `storage.destroyed`
#### `storage.unlinked`
True is the destorage has been fully destroyed.
True if the storage has been fully unlinked.
#### `storage.writing`
True if the storage is currently being written to.
#### `storage.on('open')`

@@ -124,5 +124,5 @@

#### `storage.on('destroy')`
#### `storage.on('unlink')`
Emitted when the storage is fully destroyed.
Emitted when the storage is fully unlinked.

@@ -256,11 +256,11 @@ #### `storage.on('suspend')`

#### `storage.destroy([callback])`
#### `storage.unlink([callback])`
Destroy the storage instance, removing all underlying data.
Unlink the storage instance, removing all underlying data.
#### `storage._destroy(req)`
#### `storage._unlink(req)`
Implement storage destroy.
Implement storage unlink.
Call `req.callback(err)` when the storage has been fully destroyed.
Call `req.callback(err)` when the storage has been fully unlinked.

@@ -267,0 +267,0 @@ Note this is guaranteed to run after `.close()` has been called and no methods will be run after.

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