2.0.0 • Published 4 months ago

lnmap v2.0.0

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
4 months ago

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

2.0.0

4 months ago

1.0.1

11 months ago

1.0.0

11 months ago