@sampuli/data 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -10
- package/dist/cli.js +13148 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,25 +1,66 @@
|
|
|
1
1
|
# @sampuli/data
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@sampuli/data)
|
|
4
|
+
[](https://www.npmjs.com/package/@sampuli/data)
|
|
5
|
+
[](https://github.com/kevinbett/sampuli/actions/workflows/ci.yml)
|
|
6
|
+
[](./README.md)
|
|
7
|
+
[](#)
|
|
8
|
+
|
|
9
|
+
> **Synthetic test data that passes your own validators — 90 countries.**
|
|
10
|
+
|
|
11
|
+
Most fake-data tools give you `John Doe` and a random 16-digit number. `@sampuli/data`
|
|
12
|
+
gives you a **KRA PIN that passes a KRA validator**, a **real bank's SWIFT/BIC**, a
|
|
13
|
+
**valid IBAN** (mod-97), an **ICAO-9303 passport MRZ**, a **Luhn-valid card** — each
|
|
14
|
+
one shaped to its country's actual rules (checksums, prefixes, bank codes). Entirely
|
|
15
|
+
synthetic; corresponds to no real person or account.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @sampuli/data
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**▶ Try it in your browser, no install:** [sampuli.site](https://sampuli.site) · or in your terminal: `npx @sampuli/data ke.person`
|
|
22
|
+
|
|
23
|
+
## Why not faker / Mockaroo?
|
|
24
|
+
|
|
25
|
+
| | faker.js | Mockaroo | **@sampuli/data** |
|
|
26
|
+
|---|:---:|:---:|:---:|
|
|
27
|
+
| Country-specific ID / tax formats | ✗ | partial | **✓ 90 countries** |
|
|
28
|
+
| Checksum-valid (Luhn, mod-97, mod-11…) | ✗ | ✗ | **✓** |
|
|
29
|
+
| Real bank names + SWIFT/BIC | ✗ | ✗ | **✓** |
|
|
30
|
+
| Valid IBANs, CLABE, NUBAN… | ✗ | ✗ | **✓** |
|
|
31
|
+
| Passport MRZ (ICAO-9303) | ✗ | ✗ | **✓** |
|
|
32
|
+
| Coherent records (bank↔SWIFT, gender↔name) | partial | ✗ | **✓** |
|
|
33
|
+
| Reproducible seeds · zero deps · free | ✓ | – | **✓** |
|
|
34
|
+
|
|
35
|
+
Built for **QA and CI at banks and fintechs** — test data that *passes your own
|
|
36
|
+
format validation*, so you can exercise KYC, onboarding and payment flows without
|
|
37
|
+
touching real PII.
|
|
38
|
+
|
|
39
|
+
<details><summary>Older intro / disclaimer</summary>
|
|
7
40
|
|
|
8
41
|
One API, dozens of countries: Kenyan KRA PINs & M-Pesa numbers, Nigerian BVNs,
|
|
9
42
|
German & Gulf IBANs, Italian Codice Fiscale, Brazilian CPF/CNPJ, Mexican CLABE,
|
|
10
|
-
Turkish TCKN, Singapore NRIC — and many more
|
|
11
|
-
(checksums, prefixes, bank codes).
|
|
43
|
+
Turkish TCKN, Singapore NRIC — and many more.
|
|
12
44
|
|
|
13
45
|
> **Every value is entirely synthetic.** It matches the real *format* only and
|
|
14
46
|
> corresponds to no real person, account, or registered number. Never present
|
|
15
47
|
> any output as a genuine ID, tax number, IBAN, or bank account.
|
|
16
48
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
49
|
+
</details>
|
|
50
|
+
|
|
51
|
+
## From the terminal (CLI)
|
|
52
|
+
|
|
53
|
+
No code needed — try it with `npx`:
|
|
20
54
|
|
|
21
55
|
```bash
|
|
22
|
-
|
|
56
|
+
npx @sampuli/data ke.person # one Kenyan record (JSON)
|
|
57
|
+
npx @sampuli/data ke.kra_pin # a single value
|
|
58
|
+
npx @sampuli/data ng.person -n 100 # 100 records
|
|
59
|
+
npx @sampuli/data de.person -f name,account,card,passport_mrz
|
|
60
|
+
npx @sampuli/data ke.person -n 500 --csv # CSV to stdout
|
|
61
|
+
npx @sampuli/data ke.preset:kyc # a KYC scenario
|
|
62
|
+
npx @sampuli/data --list # list all 90 country codes
|
|
63
|
+
npx @sampuli/data --list ke # a country's fields & presets
|
|
23
64
|
```
|
|
24
65
|
|
|
25
66
|
## Quick start
|