Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonytonyjan/taiwan-id
Taiwan ID checker and generator.
https://github.com/tonytonyjan/taiwan-id
id-card taiwan
Last synced: about 2 months ago
JSON representation
Taiwan ID checker and generator.
- Host: GitHub
- URL: https://github.com/tonytonyjan/taiwan-id
- Owner: tonytonyjan
- Created: 2017-06-18T08:46:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-18T11:53:19.000Z (over 7 years ago)
- Last Synced: 2024-11-02T00:18:38.333Z (2 months ago)
- Topics: id-card, taiwan
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Taiwan ID [![Build Status](https://travis-ci.org/tonytonyjan/taiwan-id.svg?branch=master)](https://travis-ci.org/tonytonyjan/taiwan-id)
## Installation
```
npm install taiwan-id
```## Usage
```js
var TaiwanId = require('taiwan-id');
TaiwanId.check('A123456789'); // true
var randomId = TaiwanId.generate();
TaiwanId.check(randomId); // true
```## Benchmark
Benchmark files is located at [`bench` directory](bench) and compared with [taiwanid](https://github.com/yutin1987/taiwanid).
```
$ date
Sun Jun 18 19:45:48 CST 2017$ env SUIT=check npm run bench
TaiwanId#check x 6,016,230 ops/sec ±1.49% (88 runs sampled)
taiwanid#verify x 1,315,703 ops/sec ±1.06% (89 runs sampled)
TaiwanId#check is faster than taiwanid#verify by 4.5726347909882294 times.$ env SUIT=generate npm run bench
TaiwanId#generate x 2,544,113 ops/sec ±3.25% (82 runs sampled)
taiwanid#generate x 358,304 ops/sec ±0.88% (86 runs sampled)
TaiwanId#generate is faster than taiwanid#generate by 7.100428146111385 times.
```