Skip to content

Read Taiwan NHI cards in JavaScript/TypeScript. 在 JavaScript/TypeScript 中,讀取中華民國健保卡。

License

Notifications You must be signed in to change notification settings

magiclen/tw-nhi-icc

Repository files navigation

TW NHI IC Card

CI

在 JavaScript/TypeScript 中,讀取中華民國健保卡。

Read Taiwan NHI cards in JavaScript/TypeScript.

用法

執行環境

請先取得並在本地端或是某處執行 TW NHI IC Card Service

撰寫程式

使用 npm 安裝本套件
npm install "git+https://github.com/magiclen/tw-nhi-icc.git#semver:^0.1"
初始化
import { TWNHIICCService } from "tw-nhi-icc";

const service = new TWNHIICCService();
取得 TW NHI IC Card Service 的版本資訊
const version = service.getVersion();
取得健保卡清單
const cards = await service.getCardList();
連接 WebSocket
await service.openWebSocket();

service.onWebSocketUpdate = (cards) => {
    // ...
};

service.closeWebSocket();

網頁瀏覽器的用法

Source

Demo Page

License

MIT

About

Read Taiwan NHI cards in JavaScript/TypeScript. 在 JavaScript/TypeScript 中,讀取中華民國健保卡。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published