This package has been deprecated

Author message:

This module has been superseded by the multiformats module

multicodec
TypeScript icon, indicating that this package has built-in type declarations

3.2.1 • Public • Published

⛔️ DEPRECATED: This module has been superseded by the multiformats module

js-multicodec

GitHub Workflow Status Codecov

JavaScript implementation of the multicodec specification

Lead Maintainer

Henrique Dias

Table of Contents

Install

> npm install 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.getNameFromCode(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.

Dependencies (2)

Dev Dependencies (5)

Package Sidebar

Install

npm i multicodec

Weekly Downloads

481,601

Version

3.2.1

License

MIT

Unpacked Size

243 kB

Total Files

22

Last publish

Collaborators

  • npm-service-account-multiformats
  • alanshaw
  • vascosantos
  • achingbrain
  • lidel
  • rvagg
  • daviddias
  • vmx
  • mikeal
  • hugomrdias
  • hacdias