js-multicodec
JavaScript implementation of the multicodec specification
Maintainers
Captain: @diasdavid.
Example
const multicodec = require('multicodec')
const prefixedProtobuf = multicodec.addPrefix('protobuf', protobufBuffer)
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
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.