Intro
Installable via npm install --save cids
, it can also be used directly in the browser.
Download
The source is available for download from GitHub. Alternatively, you can install using npm:
$ npm install --save cids
You can then require()
cids as normal:
const cids = require('cids')
In the Browser
Cids should work in any ES2015 environment out of the box.
Usage:
<script type="text/javascript" src="index.js"></script>
The portable versions of cids, including index.js
and index.min.js
, are included in the /dist
folder. Cids can also be found on unpkg.com under
toBaseEncodedString
Encode the CID into a string.
Parameters
base: string (='base58btc')
:Base encoding to use.
Returns
validateCID
Test if the given input is a valid CID object. Throws if it is not.
Parameters
other: any
:
Returns
void