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

0.0.4 • Public • Published

typestub-multihashes

TypeStub for multihashes (js-multihash)

npm Package Version

source: https://github.com/multiformats/js-multihash

TL;DL

add types to npm package multihashes and allow the client to import only once directly

Example

import * as multihashes from 'typestub-multihashes'
 
let b = Buffer.from('0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', 'hex');
 
let e = multihashes.encode(b, 'sha1');
let d = multihashes.decode(e);
console.log(d);
/* print:
{
  code: 17,
  name: 'sha1',
  length: 20,
  digest: <Buffer 0b ee c7 b5 ea 3f 0f db c9 5d 0d d4 7f 3c 5b c2 75 da 8a 33>
}
*/
 

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.420latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.420
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i typestub-multihashes

Weekly Downloads

20

Version

0.0.4

License

BSD-2-Clause

Unpacked Size

4.05 kB

Total Files

5

Last publish

Collaborators

  • beenotung