# overlay-spans

> overlay spans

Latest version **0.0.5** (published 2019-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install overlay-spans
pnpm add overlay-spans
yarn add overlay-spans
bun add overlay-spans
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2019-06-12 |
| First published | 2018-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jinyu Lin |
| Maintainers | jinyu.lin |

## Links

- npm: https://www.npmjs.com/package/overlay-spans
- Repository: https://github.com/shuruitech/overlay-spans
- Homepage: https://github.com/shuruitech/overlay-spans#readme
- Issues: https://github.com/shuruitech/overlay-spans/issues
- npm.io page: https://npm.io/package/overlay-spans

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [lodash.uniq](https://npm.io/package/lodash.uniq.md) ^4.5.0
- [lodash.difference](https://npm.io/package/lodash.difference.md) ^4.5.0

## Recent versions

- 0.0.5 (latest) — 2019-06-12
- 0.0.4 — 2018-12-27
- 0.0.3 — 2018-11-21
- 0.0.2 — 2018-11-21
- 0.0.1 — 2018-11-20

## README

# overlay-spans

overlay spans

## Install

```bash
npm install overlay-spans
```

## Build

linux

```bash
make
```

## Features

- ES5 compatible
- works in node.js (0.10+) and browsers (IE9+)
- checks equality of Date and RegExp objects by value.

## Usage

```javascript
var OverlaySpans = require("overlay-spans");
const allEntities = [
  {
    spans: [[1, 5], [7, 10]],
    annId: "1@test@overlaySpans"
  },
  {
    spans: [[2, 5], [8, 10]],
    annId: "2@test@overlaySpans"
  },
  {
    spans: [[12, 20]],
    annId: "3@test@overlaySpans"
  }
];
const originText =
  "1234567890abcdefghijklmnopqrstwxyz, 1234567890abcdefghijklmnopqrstwxyz, 1234567890abcdefghijklmnopqrstwxyz, 1234567890abcdefghijklmnopqrstwxyz";
const allSpansWIds = OverlaySpans.megerNeighborSameIdsSpans ~~getAllSpansWithAnnIds~~(
  allEntities,
  originText
);
console.log(originText);
```
## version 0.05 udpate 
new function megerNeighborSameIdsSpans

## Require entities data type

```javascript
[
  {
    spans: [[1, 5], [7, 10]],
    annId: "1@test@overlaySpans"
  },
  {
    spans: [[2, 5], [8, 10]],
    annId: "2@test@overlaySpans"
  },
  {
    spans: [[12, 20]],
    annId: "3@test@overlaySpans"
  }
];
```

Node.js v9.11.1:

```
overlay spans
to splite the entities with spans
```

```bash
npm install
```

## License

[MIT](https://github.com/kobelin923/overlay-spans/blob/master/LICENSE)

## History

0.04 fix split spans bug

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