LexoRank on Typescript
A reference implementation of a list ordering system like JIRA's Lexorank algorithm.
Getting Started
Npm
npm install lexorank
Yarn
yarn add lexorank
Storyboard
See examples
Using
Static methods
import {LexoRank} from "lexorank";
const minLexoRank = LexoRank.min();
const maxLexoRank = LexoRank.max();
const middleLexoRank = LexoRank.middle();
const parsedLexoRank = LexoRank.parse('0|0i0000:');
Public methods
import {LexoRank} from "lexorank";
const lexoRank = LexoRank.middle();
const nextLexoRank = lexoRank.genNext();
const prevLexoRank = lexoRank.genPrev();
const lexoRankStr = lexoRank.toString();
Calculate LexoRank
LexRank calculation based on existing LexoRanks.
import {LexoRank} from "lexorank";
const any1LexoRank = LexoRank.min();
const any2LexoRank = any1LexoRank.genNext().genNext();
const betweenLexoRank = any1LexoRank.between(any2LexoRank);
Related projects
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.