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

multiblob

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiblob

A content-addressable-store that supports multiple hashing algorithms, and pull-streams.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-84.54%
Maintainers
1
Weekly downloads
 
Created
Source

multiblob

A content-addressable-store that supports multiple hashing algorithms, and pull-streams.

example


var Blobs = require('multiblob')

var blobs = Blobs(dir) //pass in the basedir.

blobs.add

api: Blobs(dir)

add (hash?, cb?) => Sink

create a sink stream for writing a blob. If hash was given, then it will error if the file turned out to be different. If a cb is not given and there was an error, this function will throw.

get (hash) => Source

create a source stream that reads from a given blob. If the file does not exist this stream will error.

has(hash, cb)

check if the given hash is in the store.

ls() => Source

source stream that reads the list of hashes available in the store.

todo

maybe emit events when blobs are stored?

License

MIT

FAQs

Package last updated on 02 Dec 2014

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

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