Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
ipfs-block
Advanced tools
IPFS implementation of the Block data structure in JavaScript.
Block - A block is a blob of binary data.
> npm i ipfs-block
const Block = require('ipfs-block')
const Block = require('ipfs-block')
// create a block
const block = new Block('hello world')
console.log(block.data)
block.key((err, key) => console.log(err, key))
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
const Block = require('ipfs-block')
<script>
TagLoading this module through a script tag will make the IpfsBlock
obj available in
the global namespace.
<script src="https://unpkg.com/ipfs-block/dist/index.min.js"></script>
<!-- OR -->
<script src="https://unpkg.com/ipfs-block/dist/index.js"></script>
const Block = require('ipfs-block')
new Block(data)
data: Buffer|String
Creates a new block with raw data data
.
block.data
The raw data of the block. Its format matches whatever was provided in its constructor.
block.key([hashAlg,] callback)
hashAlg: String
, optional. Default sha2-256
.callback: Function
The callback will be called with the multihash of the block's data, as a buffer.
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
FAQs
JavaScript Implementation of IPFS Block
We found that ipfs-block demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.