Socket
Socket
Sign inDemoInstall

multiformats

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiformats - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

package.json
{
"name": "multiformats",
"version": "0.0.8",
"version": "0.0.9",
"description": "Interface for multihash, multicodec, multibase and CID.",

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

@@ -160,34 +160,1 @@ # multiformats

painful.
```
/*
* Create a new CID.
*
* The algorithm for argument input is roughly:
* ```
* if (cid)
* -> create a copy
* else if (str)
* if (1st char is on multibase table) -> CID String
* else -> bs58 encoded multihash
* else if (Buffer)
* if (1st byte is 0 or 1) -> CID
* else -> multihash
* else if (Number)
* -> construct CID by parts
* ```
*
* @param {string|Buffer|CID} version
* @param {string} [codec]
* @param {Buffer} [multihash]
* @param {string} [multibaseName]
*
* @example
* new CID(<version>, <codec>, <multihash>, <multibaseName>)
* new CID(<cidStr>)
* new CID(<cid.buffer>)
* new CID(<multihash>)
* new CID(<bs58 encoded multihash>)
* new CID(<cid>)
*/
```
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