Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@ivanvolti/lexorank

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ivanvolti/lexorank

Implementation of a list ordering system like JIRA's Lexorank algorithm

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
0
Created
Source

LexoRank on Typescript

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

npm version

This was forked from https://github.com/kvandake/lexorank-ts in October 2024 because, unfortunately, the maintainer appears to have abandoned their project.

Getting Started

Npm

npm install @dalet-oss/lexorank

Yarn

yarn add @dalet-oss/lexorank

Storyboard

See examples

Using

Static methods

import { LexoRank } from '@dalet-oss/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

import { LexoRank } from '@dalet-oss/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.

import { LexoRank } from '@dalet-oss/lexorank';

// any lexorank
const any1LexoRank = LexoRank.min();
// another lexorank
const any2LexoRank = any1LexoRank.genNext().genNext();
// calculate between
const betweenLexoRank = any1LexoRank.between(any2LexoRank);
// calculate between lexoRanks
const betweenLexoRanks = any1LexoRank.multipleBetween(any2LexoRank, 5);
  • LexoRank on C#

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.

Keywords

LexoRank

FAQs

Package last updated on 07 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts