Name: js-cid
Owner: TABLEFLIP
Description: CID implementation in JavaScript
Created: 2018-03-08 12:30:21.0
Updated: 2018-03-08 12:30:23.0
Pushed: 2018-03-08 12:41:02.0
Homepage: null
Size: 58
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
CID implementation in JavaScript.
<script>
tag
m install --save cids
The code published to npm that gets loaded on require is in fact an 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.
t CID = require('cids')
<script>
tagLoading this module through a script tag will make the `Cids
` obj available in the global namespace.
ipt src="https://unpkg.com/cids/dist/index.min.js"></script>
OR -->
ipt src="https://unpkg.com/cids/dist/index.js"></script>
You will need to use Node.js Buffer
API compatible, if you are running inside the browser, you can access it by multihash.Buffer
or you can install Feross's Buffer.
t CID = require('cids')
1 CID
t cid = new CID(1, 'dag-pb', multihash)
0 CID
t cid = new CID(base58Multihash)
See https://ipld.github.io/js-cid
Contributions welcome. Please check out the issues.
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.
Small note: If editing the Readme, please conform to the standard-readme specification.
MIT