Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

multibase

multiformats4.3mMITdeprecated4.0.6TypeScript support: included

This module has been superseded by the multiformats module

JavaScript implementation of the multibase specification

IPFS, multiformats, multibase, encode, decode, formats

readme

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

js-multibase

pl project irc codecov GitHub Workflow Status

JavaScript implementation of the multibase specification

Lead Maintainer

Hugo Dias

Table of Contents

Install

NPM

$ npm install --save multibase

Browser through <script> tag

Loading this module through a script tag will make the Multibase obj available in the global namespace.

<script src="https://unpkg.com/multibase/dist/index.min.js"></script>

Usage

Example

const multibase = require('multibase')

const bytes = multibase.encode('base58btc', new TextEncoder().encode('hey, how is it going'))

const decodedBytes = multibase.decode(bytes)
console.log(decodedBytes.toString())
// hey, how is it going

API

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

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.

changelog

4.0.6 (2021-08-24)

4.0.5 (2021-08-11)

4.0.4 (2021-04-07)

Bug Fixes

  • return basename or boolean from isEncoded (#91) (5f9ebe8)

4.0.3 (2021-04-06)

4.0.2 (2021-03-03)

Bug Fixes

  • revert node 14 to node 12 (f2fd464)

4.0.1 (2021-02-26)

4.0.0 (2021-02-26)

Features

  • remove typeVersions and update aegir to v31 (#85) (e3d4811)

BREAKING CHANGES

  • No longer supports deep type imports only from the entrypoint.

3.1.2 (2021-02-26)

Bug Fixes

3.1.1 (2021-01-13)

Bug Fixes

3.1.0 (2020-11-20)

Features

3.0.1 (2020-09-18)

3.0.0 (2020-07-31)

Bug Fixes

BREAKING CHANGES

    • node Buffers are not returned any more, only Uint8Arrays

2.0.0 (2020-07-24)

Features

  • accept Uint8Arrays in place of Buffers (#61) (abc1595)

1.0.1 (2020-06-18)

Bug Fixes

1.0.0 (2020-06-09)

Features

BREAKING CHANGES

  • names and codes export the full object that maps names/codes to base instances instead of just the keys

0.7.0 (2020-03-16)

Bug Fixes

  • throw new error object so stack traces are valid (db415c9)

Features

0.6.1 (2020-03-16)

Bug Fixes

0.6.0 (2018-11-22)

Bug Fixes

  • base64url encodes multiple occurances of + and / (#39) (84f79ba), closes #35
  • decode example typo (4d0fc17)
  • do not throw when non buffer/string passed to isEncoded (1ae01a0)

0.5.0 (2018-08-30)

Features

  • export list of multibase names and codes (#31) (c9e221c)

0.4.0 (2018-01-01)

Bug Fixes

0.3.4 (2017-03-16)

0.3.3 (2017-03-15)

Bug Fixes

  • base16: hex strings are always of even length (#16) (b02e0d3)