🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More →
Socket
Book a DemoInstallSign in
Socket

dev-zero-storage

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dev-zero-storage

Exposes the same interface as random-access-file but instead of writing/reading data to a file it will always return a zero'ed out buffer when reading (similar to reading from /dev/zero)

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

dev-zero-storage

Exposes the same interface as random-access-file but instead of writing/reading data to a file it will always return a zero'ed out buffer when reading (similar to reading from /dev/zero).

npm install dev-zero-storage

build status

Usage

var storage = require('dev-zero-storage')
var zero = storage()

zero.read(0, 10, function (err, buf) {
  console.log(buf) // 10 0-bytes
})

zero.read(0, 1000, function (err, buf) {
  console.log(buf) // 1000 0-bytes
})

License

MIT

FAQs

Package last updated on 08 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts