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

ceylon-devkit

v1.0.1

Published

CeylonDevKit - The ultimate Sri Lankan developer toolkit: LKR currency to words, Bank & Branch codes, TIN & VAT validator with Tax calculator, and CBSL working days calculator.

Readme

🇱🇰 CeylonDevKit

The all-in-one Sri Lankan developer toolkit for Node.js and TypeScript.

npm version License: MIT

CeylonDevKit brings essential Sri Lanka-specific business and financial tools into a single, zero-dependency, type-safe library:

  1. 💵 LKR Currency to Words & Formatter (Sinhala & English words, Cheque writing, Lakhs & Crores).
  2. 🏦 Sri Lanka Bank & Branch Lookup (Codes for BOC, Commercial Bank, Sampath, HNB, People's Bank, etc.).
  3. 📑 TIN & VAT Validator + Tax Calculator (9-digit IRD TIN validator, VAT number validator, and automated 18% VAT & 2.5% SSCL calculator).
  4. 📅 CBSL Working Days & Holidays Calculator (Bank, Mercantile, and Public holidays filter, working days duration, and payment due date calculator).

📦 Installation

npm install ceylon-devkit
# or
yarn add ceylon-devkit
# or
pnpm add ceylon-devkit

🚀 Quick Start & Usage

1. Currency to Words (English & Sinhala)

Convert numbers to currency words for Invoices, Receipts, and Cheques:

import { lkrToWords, formatLKR } from 'ceylon-devkit';

// English
lkrToWords(1550.50);
// => "One Thousand Five Hundred Fifty Rupees and Fifty Cents Only"

// Sinhala (සිංහල)
lkrToWords(1550.50, { lang: 'si' });
// => "රුපියල් එක්දහස් පන්සිය පනහයි ශත පනහයි පමණි"

// Cheque printing format
lkrToWords(50000, { chequeFormat: true });
// => "*** Fifty Thousand Rupees Only ***"

// South Asian Number Formatter (Lakhs & Crores)
formatLKR(1500000, { compact: true });
// => "Rs. 15.00 Lakhs"

formatLKR(25000000, { compact: true, compactLang: 'si' });
// => "රු. 2.50 කෝටි"

2. Bank & Branch Codes Lookup

Lookup official 4-digit bank codes, SWIFT codes, and branches:

import { findBank, getBanks, getBranches } from 'ceylon-devkit';

// Find bank by 4-digit code or name
findBank('7056');
// => { code: '7056', name: 'Commercial Bank of Ceylon PLC', shortName: 'Commercial Bank', swiftCode: 'CCEYLKLX' }

findBank('Sampath');
// => { code: '7278', name: 'Sampath Bank PLC', shortName: 'Sampath Bank', swiftCode: 'BSAMLKLX' }

// Get branches for a bank
const branches = getBranches('7056');
// => [{ code: '001', name: 'Colombo Fort / Head Office', ... }, ...]

3. TIN / VAT Validator & Tax Calculator (VAT & SSCL)

Validate Inland Revenue Department (IRD) TIN numbers and calculate taxes:

import { validateTIN, validateVAT, calculateTax } from 'ceylon-devkit';

// Validate 9-digit IRD TIN
validateTIN('123456789');
// => { isValid: true, tin: '123456789', formatted: '123-456-789' }

// Validate VAT Number
validateVAT('123456789-7000');
// => { isValid: true, baseTin: '123456789', branchCode: '7000' }

// Calculate 18% VAT and 2.5% SSCL according to Sri Lankan tax laws
const tax = calculateTax({
  amount: 10000,
  includeSSCL: true // Calculates SSCL 2.5% + VAT 18%
});
/*
Output:
{
  baseAmount: 10000,
  ssclAmount: 250,
  vatAmount: 1845,
  totalTax: 2095,
  totalAmount: 12095
}
*/

4. Working Days & Holidays Calculator

Calculate actual working days excluding weekends and statutory Sri Lankan holidays:

import { isWorkingDay, getWorkingDays, addWorkingDays } from 'ceylon-devkit';

// Check if a date is a working day
isWorkingDay(new Date('2025-04-14'));
// => false (Sinhala & Tamil New Year Day)

// Calculate total working days in a date range
const workingDays = getWorkingDays(new Date('2025-04-01'), new Date('2025-04-30'));
// => Returns number of working days excluding weekends and statutory holidays

// Calculate payment due date after 14 working days
const invoiceDueDate = addWorkingDays(new Date(), 14);

🛠️ TypeScript & ESM Support

ceylon-devkit comes with full TypeScript definitions out of the box and supports both CommonJS (require) and ES Modules (import).


📄 License

MIT License © 2026 Ravishka Indraji.

Built for developers, inspired by Sri Lanka 🇱🇰