# lexorank

> A reference implementation of a list ordering system like JIRA's Lexorank algorithm

Latest version **1.0.5** (published 2022-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install lexorank
pnpm add lexorank
yarn add lexorank
bun add lexorank
```

## 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.0.5 |
| Published | 2022-08-31 |
| First published | 2019-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 44.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 245 |
| Author | kvandake |
| Maintainers | kvandake |
| Keywords | LexoRank, JIRA |

## Links

- npm: https://www.npmjs.com/package/lexorank
- Repository: https://github.com/kvandake/lexorank-ts
- Issues: https://github.com/kvandake/lexorank-ts/issues
- npm.io page: https://npm.io/package/lexorank

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2022-08-31
- 1.0.4 — 2019-07-23
- 1.0.3 — 2019-07-23
- 1.0.2 — 2019-07-23
- 1.0.1 — 2019-07-23
- 1.0.0 — 2019-07-23

## README

# LexoRank on Typescript
A reference implementation of a list ordering system like [JIRA's Lexorank algorithm](https://www.youtube.com/watch?v=OjQv9xMoFbg).

[![npm version](https://badge.fury.io/js/lexorank.svg)](https://badge.fury.io/js/lexorank)

## Getting Started

Npm
```sh
npm install lexorank
```

Yarn
```sh
yarn add lexorank
```

## Storyboard
[See examples](https://630e298cd63179cde4d8775c-bensuqejhp.chromatic.com/?path=/story/dnd-kit--dnd-kit-list-story)

## Using

### Static methods


```typescript
import {LexoRank} from "lexorank";

// min
const minLexoRank = LexoRank.min();
// max
const maxLexoRank = LexoRank.max();
// middle
const middleLexoRank = LexoRank.middle();
// parse
const parsedLexoRank = LexoRank.parse('0|0i0000:');
```

### Public methods

```typescript
import {LexoRank} from "lexorank";

// any lexoRank
const lexoRank = LexoRank.middle();

// generate next lexorank
const nextLexoRank = lexoRank.genNext();

// generate previous lexorank
const prevLexoRank = lexoRank.genPrev();

// toString
const lexoRankStr = lexoRank.toString();
```

### Calculate LexoRank

LexRank calculation based on existing LexoRanks.
```typescript
import {LexoRank} from "lexorank";

// any lexorank
const any1LexoRank = LexoRank.min();
// another lexorank
const any2LexoRank = any1LexoRank.genNext().genNext();
// calculate between
const betweenLexoRank = any1LexoRank.between(any2LexoRank);
```

## Related projects
- [LexoRank on C#](https://github.com/kvandake/lexorank-dotnet)

## Licence
MIT

---
**I have not found information about the license of the algorithm LexoRank. 
If the rights are violated, please contact me to correct the current license.**

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