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 🙏

© 2024 – Pkg Stats / Ryan Hefner

fake-data-generator-taiwan

v1.0.4

Published

Generate fake data for testing in Taiwan

Downloads

125

Readme

台灣的假資料產生器 (Fake Data Generator for Taiwan)

好用的台灣假資料產生器,用於隨機產生測試用的假個資。

Supported Data types

目前已支援資料類型:

  • 繁體中文姓名 (Traditional Chinese Name) : 常見三個字、單名、複姓(依照常用字權重)
  • 台灣身分證字號 (ID Number):符合規範的身分證字號、支援第三性保留編號(但出現機率只有千分之五)
  • 手機號碼(Mobile Phone):台灣地區常用的 09 開頭的合法手機號碼格式
  • 台灣地址(Address):合法格式的完整地址,包括城市、區域、街、巷、弄、門牌號(包括附號)及樓層

Installation

可直接使用 npm 安裝:

npm install fake-data-generator-taiwan

Examples

詳細使用方法可參考 tests 內的 scripts 檔,使用範例如下:

const FakeDataGenerator = require('fake-data-generator-taiwan');

let generator = new FakeDataGenerator();

// 產生一百組假資料
const num = 100;

for (let i = 0; i < num; i++) {
	let name = generator.Name.generate();
	let mobile = generator.Mobile.generate(0, 10);
	let id = generator.IDNumber.generate();
	let address = generator.Address.generate();

	let record = {
		idNum: id,
		name: name,
		phone: mobile,
		address: address,
	};

	console.log(record);
}

會隨機生成類似下面結果的假資料:

...
{
  idNum: 'Y286803761',
  name: '于柔建',
  phone: '0934840562',
  address: '彰化縣社頭鄉延平街433號之1'
}
{
  idNum: 'S265845381',
  name: '馬怡岱',
  phone: '0924248477',
  address: '臺中市大里區中興路1段298巷275號15樓'
}
{
  idNum: 'N118578439',
  name: '于培珊',
  phone: '0935754681',
  address: '苗栗縣苑裡鎮健康二街97號6樓'
}
{
  idNum: 'E243376680',
  name: '謝霖君',
  phone: '0938271546',
  address: '桃園市新屋區東勢315號15樓'
}
...

License

Licensed under the MIT License

Authors

Copyright(c) 2020 Fred Chien <[email protected]>