# @kbase/narrative-utils

> Utility modules and functions for the Jupyterlab Narrative

Latest version **0.0.6** (published 2020-06-25) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install @kbase/narrative-utils
pnpm add @kbase/narrative-utils
yarn add @kbase/narrative-utils
bun add @kbase/narrative-utils
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-06-25 |
| First published | 2019-04-01 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 581.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | DoE KBase Project |
| Maintainers | briehl, eapearson, flyingunicorn, jayrbolton |

## Links

- npm: https://www.npmjs.com/package/@kbase/narrative-utils
- Repository: https://github.com/kbaseIncubator/narrative-utils
- Homepage: https://github.com/kbaseIncubator/narrative-utils#readme
- Issues: https://github.com/kbaseIncubator/narrative-utils/issues
- npm.io page: https://npm.io/package/@kbase/narrative-utils

## Dependencies (2)

- [moment](https://npm.io/package/moment.md) ^2.24.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.3

## Recent versions

- 0.0.6 (latest) — 2020-06-25
- 0.0.5 — 2019-04-22
- 0.0.4 — 2019-04-04
- 0.0.3 — 2019-04-04
- 0.0.2 — 2019-04-02
- 0.0.1 — 2019-04-01

## README

# narrative-utils
Utility modules and APIs and such for the Jupyterlab Narrative


This is all written in TypeScript for the Shiny New KBase-UI. It's packaged and stored on NPM in the @kbase namespace.


# Installation for other modules
```
> npm install @kbase/narrative-utils
```

# Testing
1. Fetch this repo.
```
> git clone https://github.com/kbaseIncubator/narrative-utils
> cd narrative-utils
```
2. Build it
```
> npm install
```
3. Run the tests
```
> npm run test
```

# Contributing

### Adding code
All the code is under `src/` in various `.ts` (TypeScript) modules. When adding a new module or function, be sure that it is included in `index.ts` as an `export` statement, as that's the main entrypoint.

This is (currently) meant to be a catchall utility module for the new Narrative-Jupyterlab interface. It might eventually be broken down into sub-utilities, or more specialized things. For now, though, anything goes. Just decompose as logic dictates.

Be sure to run `npm run build` and `npm run test` occcasionally to test your stuff!

### Testing
Each added module should be accompanied by tests. This uses Mocha as the test runner and Chai as the runner language. All test specs are included under `test/`. They're expected to run in a Node environment. If your module expects some browser features, you might need to add those to the test runner. See `test/authSpec.js` for an example of using `jsdom` to dummy up a `window` and `document` feature.

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