multicodec
JavaScript implementation of the multicodec specification
Last updated 13 days ago by hacdias .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install multicodec 
SYNC missed versions from official npm registry.

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:

node ./tools/update-table.js

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.

Current Tags

  • 1.0.3                                ...           latest (13 days ago)

29 Versions

  • 1.0.3                                ...           13 days ago
  • 1.0.2                                ...           24 days ago
  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           7 months ago
  • 0.5.7 [deprecated]           ...           7 months ago
  • 0.5.6 [deprecated]           ...           7 months ago
  • 0.5.5 [deprecated]           ...           a year ago
  • 0.5.4 [deprecated]           ...           a year ago
  • 0.5.3 [deprecated]           ...           a year ago
  • 0.5.1 [deprecated]           ...           a year ago
  • 0.5.0 [deprecated]           ...           a year ago
  • 0.4.0 [deprecated]           ...           2 years ago
  • 0.3.0 [deprecated]           ...           2 years ago
  • 0.2.7 [deprecated]           ...           2 years ago
  • 0.2.6 [deprecated]           ...           2 years ago
  • 0.2.5 [deprecated]           ...           3 years ago
  • 0.2.4 [deprecated]           ...           3 years ago
  • 0.2.3 [deprecated]           ...           3 years ago
  • 0.1.9 [deprecated]           ...           3 years ago
  • 0.1.8 [deprecated]           ...           3 years ago
  • 0.1.7 [deprecated]           ...           3 years ago
  • 0.1.6 [deprecated]           ...           3 years ago
  • 0.1.5 [deprecated]           ...           3 years ago
  • 0.1.4 [deprecated]           ...           3 years ago
  • 0.1.3 [deprecated]           ...           4 years ago
  • 0.1.2 [deprecated]           ...           4 years ago
  • 0.1.1 [deprecated]           ...           4 years ago
  • 0.1.0 [deprecated]           ...           4 years ago
  • 0.0.1 [deprecated]           ...           4 years ago

Copyright 2014 - 2017 © taobao.org |