https://github.com/az33zy/lexirank
Ranking system for ordered lists that leverages lexicographic ordering feature of strings.
https://github.com/az33zy/lexirank
lexicographic lexorank ordered-list ranking sorting
Last synced: 4 months ago
JSON representation
Ranking system for ordered lists that leverages lexicographic ordering feature of strings.
- Host: GitHub
- URL: https://github.com/az33zy/lexirank
- Owner: az33zy
- License: mit
- Created: 2024-12-20T06:10:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-24T18:29:45.000Z (over 1 year ago)
- Last Synced: 2025-09-28T09:29:59.558Z (9 months ago)
- Topics: lexicographic, lexorank, ordered-list, ranking, sorting
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/lexirank
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# LexiRank
[](https://www.npmjs.com/package/lexirank)
[](https://bundlephobia.com/package/lexirank)
[](LICENSE)
Ranking system for ordered lists that leverages lexicographic ordering feature of strings.
## Installation
### NPM
```bash
npm i lexirank
```
### PNPM
```bash
pnpm add lexirank
```
### Yarn
```bash
yarn add lexirank
```
### Bun
```bash
bun add lexirank
```
## Usage
```js
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](./LICENSE)