npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nan0web/finance

v1.0.0

Published

Financial logic, formatting, and calculations for nan0web apps.

Readme

@nan0web/finance

Financial logic, formatting, and calculations for nan0web platforms. This package provides reliable tools for banking, credit, and tax calculations, with a focus on precision and local requirements (like Ukraine taxes).

Installation

How to install?

pnpm add @nan0web/finance

Formatting Utilities

formatAmount(value, currency, locale, options)

Formats numbers, arrays, or {min, max} objects as currency strings or ranges.

How to format currency range?

const range = { min: 1000, max: 5000 }
const formatted = formatAmount(range, 'UAH', 'uk-UA')
// Example: "1 000,00 ₴ — 5 000,00 ₴"

formatRate(value, locale)

Formats fractional numbers as percentage strings.

How to format percentage?

const rate = 0.125
const formatted = formatRate(rate, 'en-US')
// Example: "12.5%"

Calculations

calcCommission(amount, rules)

Calculates commission based on fixed rates or complex rules (min/max).

How to calculate commission with limit?

const rules = { value: 1, maxAmount: 50 } // 1%, max 50
const res = calcCommission(10000, rules)
// 1% of 10000 is 100, but max is 50

Ukraine-specific Taxes

UATaxCalculator

Calculates Personal Income Tax (18%) and Military Tax (1.5%).

How to calculate UA taxes?

const calc = new UATaxCalculator()
const details = calc.getDetails(10000)

Loan Engine

LoanEngine.generateSchedule(amount, rate, term, options)

Generates amortization schedule for annuity or differential payments.

How to generate loan schedule?

const schedule = LoanEngine.generateSchedule(10000, 0.12, 12, { gracePeriod: 2 })