JSPM

lnmap

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 73
  • Score
    100M100P100Q71715F
  • License Apache-2.0 OR MIT

Typed Map of IPLD links (CIDs) and values.

Package Exports

  • lnmap
  • lnmap/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lnmap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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