# @digitalbazaar/webkms-context

> A WebKMS context library for JavaScript.

Latest version **2.1.0** (published 2022-01-14) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @digitalbazaar/webkms-context
pnpm add @digitalbazaar/webkms-context
yarn add @digitalbazaar/webkms-context
bun add @digitalbazaar/webkms-context
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2022-01-14 |
| First published | 2022-01-11 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Digital Bazaar, Inc. |
| Maintainers | dlongley, msporny, davidlehn, mattcollier, gannan, codenamedmitri |

## Links

- npm: https://www.npmjs.com/package/@digitalbazaar/webkms-context
- Repository: https://github.com/digitalbazaar/webkms-context
- Homepage: https://github.com/digitalbazaar/webkms-context#readme
- Issues: https://github.com/digitalbazaar/webkms-context/issues
- npm.io page: https://npm.io/package/@digitalbazaar/webkms-context

## Recent versions

- 2.1.0 (latest) — 2022-01-14
- 2.0.0 — 2022-01-11

## README

# WebKMS Context Repository _(webkms-context)_

[![Build status](https://img.shields.io/github/workflow/status/digitalbazaar/webkms-context/Node.js%20CI)](https://github.com/digitalbazaar/webkms-context/actions?query=workflow%3A%22Node.js+CI%22)
[![Coverage status](https://img.shields.io/codecov/c/github/digitalbazaar/webkms-context)](https://codecov.io/gh/digitalbazaar/webkms-context)
[![NPM Version](https://img.shields.io/npm/v/webkms-context.svg)](https://npm.im/webkms-context)

> A WebKMS context library for JavaScript.

## Table of Contents

- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [Commercial Support](#commercial-support)
- [License](#license)

## Background

See also (related specs):

* [WebKMS v0.1](https://w3c-ccg.github.io/webkms/)

## Install

Requires Node.js 12+

To install via NPM:

```
npm install webkms-context
```

## Usage

```js
const webkms = require('webkms-context');

webkms.CONTEXT_URL
// 'https://w3id.org/webkms/v1'

// Codec term map value for CBOR-LD
webkms.constants.CBORLD_CODEC_VALUE
// 0x19

// get context data for a specific context
webkms.CONTEXT
// full context object
```

This package can be used with bundlers, such as [webpack][], in browser
applications.

## API

The library exports the following properties:
- `CONTEXT_URL`
- `CONTEXT`
- `constants`: A Object that maps constants to well-known context URLs. The
  main constant `CONTEXT_URL` may be updated from time to time to the
  latest context location.
- `contexts`: A `Map` that maps URLs to full context data.
- `appContextMap`: For use with `cborld` library.

## Developing

WARNING: The `.jsonld` in `contexts/` is auto-generated by the `npm run build` script,
each time you run the test suite.

DO NOT edit it directly (or your changes will be quickly overwritten).
Instead, make all context changes to `js/context.js`.

## Commercial Support

Commercial support for this library is available upon request from
Digital Bazaar: support@digitalbazaar.com

## License

- BSD 3-Clause © Digital Bazaar
- See the [LICENSE](./LICENSE) file for details.

[webpack]: https://webpack.js.org/

---
_Source: https://npm.io/package/@digitalbazaar/webkms-context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
