Package Exports
- multicodec
- multicodec/src/base-table
- multicodec/src/name-table
- multicodec/src/util
- multicodec/src/varint-table
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (multicodec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
js-multicodec
JavaScript implementation of the multicodec specification
Install
> npm install multicodec
const multicodec = require('multicodec')
Usage
Example
const multicodec = require('multicodec')
const prefixedProtobuf = multicodec.addPrefix('protobuf', protobufBuffer)
// prefixedProtobuf 0x50...
Updating the lookup table
Updating the lookup table is a manual process. The source of truth is the multicodec default table. To make the process easier, there’s an AWK script in the tools directory that does a basic conversion of the default table. The result can’t be used as-is, but serves as a template for manual diffing. The workflow is:
Create a basic draft version
curl -X GET https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv|awk -f tools/update-table.awk > /tmp/draft.js
Diff it with your tool of choice (e.g. Meld) and apply the changes
meld /tmp/draft.js base-table.js
API
https://multiformats.github.io/js-multicodec/
multicodec default table
Maintainers
Captain: @diasdavid.
Contribute
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.
License
MIT © 2016 Protocol Labs Inc.