Package Exports
- multicodec
- multicodec/src/base-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
Maintainers
Captain: @diasdavid.
Example
const multicodec = require('multicodec')
const prefixedProtobuf = multicodec.addPrefix('protobuf', protobufBuffer)
// prefixedProtobuf 0x50...
Usage
Install
> npm install multicodec
const multicodec = require('multicodec')
API
multicodec.addPrefix(<multicodecStrOrCode>, <data>)
Prefixes a buffer with a multicodec-packed
multicodec.rmPrefix(<prefixedData>)
Decapsulate the multicodec-packed prefix from the data
multicodec.getCodec(<prefixedData>)
Get the codec of the prefixedData
multicodec default table
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 © Protocol Labs Inc.