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

@zenuinebit/rent-schedule

v0.1.0

Published

Rent schedules with escalation, proration, deposits and late fees. Works in minor units.

Readme

@zenuinebit/rent-schedule

Rent for a lease month by month, with proration, yearly increases, payments, late fees and deposit settlement. Amounts are integers in minor units (see @zenuinebit/money). Dates are "YYYY-MM-DD" strings.

import { schedule, applyPayments, lateFee, settleDeposit } from "@zenuinebit/rent-schedule";

const lease = schedule({
  startDate: "2025-01-15",
  months: 11,                                    // or endDate: "2025-12-14"
  monthlyRent: 2_500_000,                        // 25,000.00 in minor units
  dueDay: 5,
  escalation: { percent: 5, everyMonths: 12 },   // optional
});
lease.rows;   // [{ number, periodStart, periodEnd, days, dueDate, monthlyRent, prorated, amount }]
lease.total;

const ledger = applyPayments(lease.rows, [{ date: "2025-01-15", amount: 2_500_000 }]);
ledger.rows[0].status;   // "paid" | "partial" | "unpaid"
ledger.outstanding;      // unpaid rent
ledger.credit;           // paid in advance

lateFee({ amountDue: 2_500_000, dueDate: "2025-03-05", paidDate: "2025-03-12" },
        { graceDays: 3, flat: 50_000, perDay: 10_000, cap: 200_000 });
// { daysLate: 4, fee: 90000 }

settleDeposit(5_000_000, [{ reason: "Repainting", amount: 800_000 }]);
// { deducted: 800000, refund: 4200000, shortfall: 0 }

How it works

  • Rent is billed per calendar month. A first or last month that is only partly covered is prorated by days: rent x days / days in that month, rounded to the minor unit.
  • Escalation happens at the start of every Nth billing period and compounds on the previous rounded rent, so a lease that starts mid-month increases on a month boundary, not on the anniversary.
  • applyPayments pays the oldest rent first and splits one payment over several months if needed.
  • lateFee counts days after the grace period. Flat and percent fees apply once the payment is late; per-day fees grow daily; cap limits the total.
  • Dates are plain calendar dates, so there are no time-zone surprises.

Not included: interest on late rent, tax or TDS on rent, maintenance charges, and rent-control limits. Your lease terms and local law decide those.