Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 894 Bytes

File metadata and controls

50 lines (33 loc) · 894 Bytes

LexiRank

Version Bundle Size License

Ranking system for ordered lists that leverages lexicographic ordering feature of strings.

Installation

NPM

npm i lexirank

PNPM

pnpm add lexirank

Yarn

yarn add lexirank

Bun

bun add lexirank

Usage

import { LexiRank, AsciiPrintableCharSet } from "lexirank"

const lexirank = new LexiRank(new AsciiPrintableCharSet())

const mid = lexirank.mid() // "O"
const beforeMid = lexirank.before(mid) // "8"
const afterMid = lexirank.after(mid) // "f"
const between = lexirank.between("A", "C") // "B"

License

MIT