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

2.0.0 • Public • Published

lnmap

Build JavaScript Style Guide

Typed Map of IPLD links (CIDs) and values.

Install

npm i lnmap

Usage

import { Map } from 'lnmap'
import { sha256 } from 'multiformats/hashes/sha2'
import * as raw from 'multiformats/codecs/raw'
import { CID } from 'multiformats/cid'

const key = CID.create(1, raw.code, sha256.digest(new Uint8Array()))
const value = 'any data'

const map = new Map()
map.set(key, value)

console.log(map.get(key)) // prints: "any data"

Contributing

Feel free to join in. All welcome. Please open an issue!

License

Dual-licensed under MIT + Apache 2.0

Readme

Keywords

Package Sidebar

Install

npm i lnmap

Weekly Downloads

17

Version

2.0.0

License

Apache-2.0 OR MIT

Unpacked Size

18.2 kB

Total Files

5

Last publish

Collaborators

  • alanshaw