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

@mtdevworks/toolkit

v1.0.1

Published

Finance calculators & developer utilities — GST, HRA, SIP, EMI, Income Tax, FD/RD, Gratuity, JSON, Base64, Hash, Password

Readme

@mtdevworks/toolkit

India-specific financial calculators & developer utilities — used by mtdevworks.com/tools

npm License: MIT

Install

npm install @mtdevworks/toolkit

Quick Start

import {
  calculateSip,
  formatJson,
  generatePassword,
} from '@mtdevworks/toolkit';

// SIP Investment Returns
const sip = calculateSip({
  monthlyAmount: 10000,
  years: 10,
  expectedReturn: 12,
});
console.log(sip.corpus); // ₹23,23,391
console.log(sip.cagr); // 12%

// Format JSON
const formatted = formatJson('{"b":2,"a":1}', { sortKeys: true, indent: 2 });

// Generate Secure Password
const [pw] = generatePassword({ length: 20, symbols: true });
console.log(pw.password); // "kQ#9xR!mP2..."
console.log(pw.strength); // "very-strong"

Sub-path Imports

Import only what you need for smaller bundles:

import { calculateEmi } from '@mtdevworks/toolkit/finance';
import { base64Encode } from '@mtdevworks/toolkit/dev';

Finance Calculators

calculateGstLateFee(input)

GST late filing fee + 18% interest for GSTR-3B, GSTR-1, GSTR-4, GSTR-9.

import { calculateGstLateFee } from '@mtdevworks/toolkit';

const result = calculateGstLateFee({
  returnType: '3B',
  isNil: false,
  daysLate: 45,
  taxLiability: 100000,
  annualTurnover: 10000000,
});
// { lateFee: 2000, interest: 2219.18, total: 4219.18, dailyFee: 50, capped: true }

calculateHra(input)

HRA exemption under Section 10(13A) — min of actual HRA, rent minus 10% basic, 50%/40% of basic.

const result = calculateHra({
  basicAnnual: 600000,
  hraReceived: 300000,
  rentPaidAnnual: 240000,
  isMetro: true,
});
// { exemption: 180000, taxableHra: 120000, ... }

calculateSip(input)

SIP returns with CAGR, inflation-adjusted corpus, and equity LTCG or debt tax.

| Field | Type | Description | | ---------------- | --------------------- | ------------------------------- | | monthlyAmount | number | Monthly SIP amount | | years | number | Investment period | | expectedReturn | number | Annual return % | | inflation | number? | Inflation rate % (default: 6) | | fundType | 'equity' \| 'debt'? | Tax treatment (default: equity) |

calculateEmi(input)

EMI with year-by-year amortization table and prepayment analysis.

const result = calculateEmi({
  principal: 5000000,
  rate: 8.5,
  tenureYears: 20,
  annualPrepayment: 100000,
});
console.log(result.emi); // 43391.22
console.log(result.actualTenureYears); // 15 (reduced by prepayment)
console.log(result.amortization); // [{ year, principalPaid, interestPaid, balance }]

calculateFd(input) / calculateRd(input)

Fixed Deposit and Recurring Deposit with quarterly compounding, TDS, and senior citizen bonus.

calculateIncomeTax(input)

Old vs New regime comparison for FY 2025-26 with all major deductions.

const result = calculateIncomeTax({
  grossIncome: 1500000,
  deductions80c: 150000,
  deductions80d: 25000,
  hraExemption: 180000,
});
// { oldRegime: { tax: ... }, newRegime: { tax: ... }, recommended: 'old', savings: 42000 }

calculateGratuity(input)

Gratuity under Payment of Gratuity Act — under/not-under Act formulas, ₹25L tax exemption cap.

optimizeSalary(input)

CTC-to-take-home breakdown with Old vs New regime comparison, EPF, HRA exemption.


Developer Utilities

formatJson(input, options?) / minifyJson(input) / validateJson(input)

formatJson('{"b":2,"a":1}', { sortKeys: true, indent: 4 });
minifyJson('{ "a" : 1 }'); // '{"a":1}'
validateJson('invalid'); // { valid: false, error: "..." }

base64Encode(input, options?) / base64Decode(input, options?)

base64Encode('Hello World'); // "SGVsbG8gV29ybGQ="
base64Encode('Hello World', { urlSafe: true }); // "SGVsbG8gV29ybGQ"
base64Decode('SGVsbG8gV29ybGQ='); // "Hello World"

generateHash(input, algorithms?)

Requires Node.js. Generates MD5, SHA-1, SHA-256, SHA-512 hashes.

const hashes = generateHash('my secret data');
// { md5: "...", sha1: "...", sha256: "...", sha512: "..." }

const sha = generateHash('my data', ['sha256']);
// { sha256: "..." }

generatePassword(options?)

Cryptographically secure password generation with entropy scoring.

const passwords = generatePassword({
  length: 24,
  uppercase: true,
  lowercase: true,
  digits: true,
  symbols: true,
  excludeAmbiguous: true,
  count: 5,
});
// [{ password: "...", entropy: 142.56, strength: "very-strong" }, ...]

Also Available As

| Channel | URL | | ------------- | ---------------------------------------------------- | | Web UI | mtdevworks.com/tools | | REST API | api.mtdevworks.com | | Portfolio | mtdevworks.com |

License

MIT © mtdevworks