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

@bakissation/jibaya

v1.0.2

Published

Algerian tax & fiscal formulas in TypeScript — IRG, IBS, IFU, VAT, droit de timbre, enregistrement, taxe foncière, social contributions (CNAS/CASNOS/CACOBATPH), penalties and indirect duties. Law-cited, versioned by Loi de Finances year, dinar-backed.

Readme

@bakissation/jibaya

Algerian tax & fiscal formulas in TypeScript — IRG, IBS, IFU, VAT, droit de timbre, enregistrement, taxe foncière, social contributions (CNAS/CASNOS/CACOBATPH), penalties and indirect duties. Every figure is cited to its article, versioned by Loi de Finances year, and returned as a Dinar so the money math never drifts.

npm CI license

npm install @bakissation/jibaya

@bakissation/dinar comes with it (it's a dependency) — import { Dinar } from it to build amounts.

Why

Algerian fiscal rules are scattered across six codes and change every Loi de Finances. jibaya encodes them as plain, tree-shakeable functions: money in, money out, each one law-cited in its JSDoc and keyed to the LF year (defaulting to the latest). Its only dependency is @bakissation/dinar.

import { Dinar } from '@bakissation/dinar';
import { computeIRG, computeVAT, payroll, invoice } from '@bakissation/jibaya';

computeIRG(Dinar.fromDinars(1_500_000)).format();      // → "346 800,00 DA" (Art. 104, LF 2026)
computeVAT(Dinar.fromDinars(100_000)).format();        // → "19 000,00 DA" (19%, Art. 21 CTCA)

// Composite helpers for real workflows
const slip = payroll(Dinar.fromDinars(80_000));        // CNAS-before-IRG ordering
slip.net.format();                                     // → "60 844,00 DA"

const bill = invoice({ ht: Dinar.fromDinars(100_000), paidInCash: true });
bill.ttc.format();                                     // → "121 380,00 DA" (VAT + cash stamp)

What it covers

| Area | Functions | |---|---| | IRG | computeIRG · computeSalaryIRG · computeRentalIRG · computeOccasionalIncomeTax · computeDividendTax · computeInterestTax · computeRealEstateGainTax · computeSecuritiesGainTax | | Company / forfait | computeIBS · computeIBSWithholding · computeIFU | | Property / depreciation | computeFoncierBati · computeFoncierNonBati · amortizationLinear/Degressive/Progressive | | VAT | computeVAT · vatDue · isVATDeductible · vatDeductibleProrata | | Stamp / registration | computeStampDuty (+ constants) · computeRegistrationDuty · registrationFixedDuty · lateRegistrationPenalty | | Penalties | computeLatePaymentPenalty · computeInsufficiencyPenalty | | Social | cnasEmployee · cnasEmployer · cnasBreakdown · casnos · cacobatph | | Indirect duties | droitCirculationAlcool · droitCirculationVin · droitGarantie · droitEssai · taxeTabac | | Helpers | payroll · grossFromNet · payrollBatch · invoice · ttcToHt · vatReturn · corporateTaxDue · ibsInstallments · dividendNet · interestNet · capitalGainNet · rentalIncomeNet · propertyTransferDuties · annualPropertyTax · selfEmployedAnnual · amountDueWithPenalties |

Years

import { computeDividendTax, LATEST_YEAR, supportedYears } from '@bakissation/jibaya';
import { Dinar } from '@bakissation/dinar';

computeDividendTax(Dinar.fromDinars(100_000));         // 10% — LF 2026 (default)
computeDividendTax(Dinar.fromDinars(100_000), 2025);   // 15% — LF 2025
supportedYears();                                      // [2025, 2026]

Every function takes an optional trailing year argument; omit it for the latest (LATEST_YEAR).

Notes

  • Not tax advice. Rates are encoded from the official codes (see docs/), but edge cases, exemptions and rulings vary — verify against the current texts for filing.
  • Tax is computed at centime precision; round to the dinar for filing if your administration requires it.

See docs/ for the full API reference and the per-tax legal sources.

License

MIT © Abdelbaki Berkati

Credits

Built and maintained by Abdelbaki Berkatiberkati.xyz · @bakissation.