Swap-Aggregator-Subgraph/node_modules/multicodec
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30
..
dist Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
src Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
tools Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
.travis.yml Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
CHANGELOG.md Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
example.js Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
LICENSE Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
package.json Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30
README.md Revert "Revert "added handler"" 2022-07-03 07:30:05 +05:30

js-multicodec

Travis CI Coverage Status

JavaScript implementation of the multicodec specification

Lead Maintainer

Henrique Dias

Table of Contents

Install

> npm install multicodec

The type definitions for this package are available on http://definitelytyped.org/. To install just use:

$ npm install -D @types/multicodec

Usage

Example


const multicodec = require('multicodec')

const prefixedProtobuf = multicodec.addPrefix('protobuf', protobufBuffer)
// prefixedProtobuf 0x50...

// The multicodec codec values can be accessed directly:
console.log(multicodec.DAG_CBOR)
// 113

// To get the string representation of a codec, e.g. for error messages:
console.log(multicodec.print[113])
// dag-cbor

API

https://multiformats.github.io/js-multicodec/

multicodec default table

Updating the lookup table

Updating the lookup table is done with a script. The source of truth is the multicodec default table. Update the table with running:

npm run update-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 © 2016 Protocol Labs Inc.