# @jacobbubu/meta-job-list

> [![Build Status](https://github.com/jacobbubu/meta-job-list/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/meta-job-list/actions?query=workflow%3A%22Build+and+Release%22) [![Coverage Status](https://coveralls.io/repos/github/jaco

Latest version **1.2.0** (published 2020-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jacobbubu/meta-job-list
pnpm add @jacobbubu/meta-job-list
yarn add @jacobbubu/meta-job-list
bun add @jacobbubu/meta-job-list
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-10-23 |
| First published | 2020-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 4 |
| Unpacked size | 35.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jacobbubu |
| Maintainers | jacobbubu |

## Links

- npm: https://www.npmjs.com/package/@jacobbubu/meta-job-list
- Repository: https://github.com/jacobbubu/meta-job-list
- Homepage: https://github.com/jacobbubu/meta-job-list#readme
- Issues: https://github.com/jacobbubu/meta-job-list/issues
- npm.io page: https://npm.io/package/@jacobbubu/meta-job-list

## Dependencies (4)

- [@jacobbubu/debug](https://npm.io/package/@jacobbubu/debug.md) ^1.2.0
- [@jacobbubu/job-list](https://npm.io/package/@jacobbubu/job-list.md) ^1.0.3
- [@jacobbubu/merged-model](https://npm.io/package/@jacobbubu/merged-model.md) ^1.0.3
- [@jacobbubu/scuttlebutt-pull](https://npm.io/package/@jacobbubu/scuttlebutt-pull.md) ^1.9.1

## Recent versions

- 1.2.0 (latest) — 2020-10-23
- 1.1.1 — 2020-10-19
- 1.1.0 — 2020-10-10
- 1.0.0 — 2020-09-26

## README

# @jacobbubu/meta-job-list

[![Build Status](https://github.com/jacobbubu/meta-job-list/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/meta-job-list/actions?query=workflow%3A%22Build+and+Release%22)
[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/meta-job-list/badge.svg)](https://coveralls.io/github/jacobbubu/meta-job-list)
[![npm](https://img.shields.io/npm/v/@jacobbubu/meta-job-list.svg)](https://www.npmjs.com/package/@jacobbubu/meta-job-list/)

> Combine JobList and MergedModel to implement a JobList that cleans up jobs based on the number of how many peers been synced.

## Intro.

I use a MergedModel to keep track of how many peers have synced for each job, so I can boldly delete the job.

`MetaJobList` is a class that combine a jobList and a mergedModel that used to store meta data.

`CappedJobList` is more like an example to show how to use `MetaJobList`. it shows how to set a sync threshold. When the number of peers synced to a job reaches this threshold, we delete the job and `applyUpdate` will not accept any further updates to the job.

Please use the [example](./examples/ex1.ts) to understand how this logic works.

---
_Source: https://npm.io/package/@jacobbubu/meta-job-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
