Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

osumodcalculator

sbrstrkkdwmdr52MIT2.0.6TypeScript support: included

osu! calculator for converting values to DT & HT and other things

osu!, osugame, osu, dt, ht, ar, od, double, time, half, time, approach, rate, overall, difficulty, calculator

readme

osu! mod calculator

NPM link CodeFactor

Docs

Installation

npm i osumodcalculator

Usage

import { types, mod } from "osumodcalculator";

const mods: types.Mod[] = mod.fromString("HDDTHR"); // => ['HD', 'DT', 'HR']

notes:

  • EZ & HR calculations should come before DT/HT calculations
  • OD is listed as accuracy in the osu! api
  • HP is listed as drain in the osu! api

credits:

Contact

My website

changelog

CHANGELOG

2.0.5

  • add mode.fromValue()

2.0.4

  • forgot to remove a console.log while testing

2.0.3

  • accuracy fix SS being impossible for lazer (osu) and legacy (taiko)
  • add postinstall script
  • merge mod.removeDisallowed() functionality into mod.removeIncompatible()

2.0.2

  • add mod.fromString()

2.0.1

  • stats.modded() and stats.speed() now include a formatted song length
  • remove random console log

2.0.0

  • added docs page
  • reorganised methods
  • fix taiko rank calculations
  • mod calculations use string arrays instead of strings ("HDDTHR" -> ["HD", "DT", "HR"])

1.0.0