multiformats
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"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>) | ||
*/ | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58436
160