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

taiwan-payroll

v1.3.1

Published

台灣勞健保勞退計算引擎 — 勞保、健保、勞退、職災、二代健保補充保費、薪資扣繳、勞保老年給付;零依賴、對官方範例逐位元驗證。

Readme

taiwan-payroll

台灣勞健保勞退計算引擎(TypeScript,零執行期依賴)。完整文件見 GitHub repository

import { createPayrollEngine } from 'taiwan-payroll';

const engine = createPayrollEngine({ year: 2026 });
const r = engine.calculate({ monthlySalary: 42000, dependents: 1, pensionSelfContribution: 0.06 });

部分工時:engine.calculate({ monthlySalary: 15000, partTime: true }) 會對到官方部分工時低級距(勞保/健保 15,840),職保仍歸第 1 級 29,500(官方規定)。

外籍:identity: 'migrantGeneral'(一般移工,勞保 11.5%、無就保/勞退)、identity: 'migrantDomestic'(家事移工,僅健保+職災;職災費率傳 occupationalRate: 0.0018)。外籍配偶用預設 category1

申報媒體檔(健保補充保費)

產生健保署「補充保險費明細申報檔」(CSV/Big5),6 類所得各一:generateSupplementaryBonusFiling(獎金62)、...ParttimeFiling(兼職63)、...ProfessionalFiling(執行業務65)、...DividendFiling(股利66)、...InterestFiling(利息67)、...RentFiling(租金68)。

import { generateSupplementaryBonusFiling } from 'taiwan-payroll';
const { filename, content } = generateSupplementaryBonusFiling({
  year: 2026, filingDate: '20260901',
  unit: { taxId: '11111111', name: '甲公司', phone: '0227065866', email: '[email protected]', contactName: '王小明' },
  records: [{ action: 'I', payDate: '20260615', payeeId: 'A123456789', payeeName: '李四', bonusAmount: 50000, insuredSalary: 31800, ytdBonusCumulative: 150000, unitCode: '123456789' }],
});
// content 為 Unicode 字串;檔案實際為 Big5,存檔請以 Big5 編碼寫出(如 iconv-lite)。

Big5 編碼刻意留給呼叫端處理,讓 core 維持零依賴;Python 套件則隨附 to_big5_bytes() 便利函式。

皆以健保署官方範例逐位元驗證。股利逐列保費由呼叫端提供(另附 calcDividendPremium)。完整 API 見 文件站 /docs/api

勞保老年給付試算

三種老年給付,皆對勞保局官方數值/公式驗證:calcOldAgePension(年金月領,擇優兩式、可提前/延後)、calcOldAgeLumpSum(老年一次金)、calcOldAgeSinglePayment(一次請領,舊制基數)。另附 averageHighestInsuredSalarystatutoryClaimAge

import { calcOldAgePension, getYearData } from 'taiwan-payroll';
calcOldAgePension(getYearData(2026), { avgInsuredSalary: 32000, years: 35, months: 6 });
// → { formulaA, formulaB, monthly, adjustmentMonths, eligible }

免責聲明

計算結果僅供參考,實際應繳金額以勞保局、健保署核發之繳款單為準。本套件不構成法律或會計建議。