Skip to content

Commit c4bf678

Browse files
committed
chore: wip
1 parent 02a21ce commit c4bf678

File tree

17 files changed

+1191
-12
lines changed

17 files changed

+1191
-12
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A performance-focused and lightweight faker library for TypeScript with comprehe
1313
## Features
1414

1515
- ⚡️ **Performance-focused** - Built with speed and efficiency in mind
16-
- 🌍 **Multi-locale Support** - Complete translations for 9 languages:
16+
- 🌍 **Multi-locale Support** - Complete translations for 16 languages:
1717
- English (en)
1818
- Spanish (es)
1919
- French (fr)
@@ -23,6 +23,13 @@ A performance-focused and lightweight faker library for TypeScript with comprehe
2323
- Japanese (ja)
2424
- Filipino (tl)
2525
- Chinese (zh)
26+
- Dutch (nl)
27+
- Korean (ko)
28+
- Norwegian (no)
29+
- Swedish (sv)
30+
- Danish (da)
31+
- Ukrainian (uk)
32+
- Hindi (hi)
2633
- 📦 **Lightweight** - Minimal dependencies and small bundle size
2734
- 💪 **Fully Typed** - Written in TypeScript with comprehensive type definitions
2835
- 🎯 **Comprehensive Data** - 16+ data categories including:
@@ -104,6 +111,13 @@ console.log(chineseFaker.person.fullName()) // "王伟"
104111
- `ja` - Japanese
105112
- `tl` - Filipino
106113
- `zh` - Chinese
114+
- `nl` - Dutch
115+
- `ko` - Korean
116+
- `no` - Norwegian
117+
- `sv` - Swedish
118+
- `da` - Danish
119+
- `uk` - Ukrainian
120+
- `hi` - Hindi
107121

108122
### API Examples
109123

docs/cli.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ nanofaker generate <category> <method> [options]
2727
```
2828

2929
**Options:**
30-
- `--locale <locale>` - Locale to use (en, es, fr, de, it, pt, ja, tl, zh)
30+
- `--locale <locale>` - Locale to use (en, es, fr, de, it, pt, ja, tl, zh, nl, ko, no, sv, da, uk, hi)
3131
- `--count <count>` - Number of items to generate (default: 1)
3232
- `--seed <seed>` - Seed for reproducible results
3333
- `--json` - Output as JSON
@@ -113,7 +113,7 @@ List all available locales.
113113
nanofaker locales
114114
```
115115

116-
Shows all 9 supported locales:
116+
Shows all 16 supported locales:
117117
- en - English
118118
- es - Spanish
119119
- fr - French
@@ -123,6 +123,13 @@ Shows all 9 supported locales:
123123
- ja - Japanese
124124
- tl - Filipino
125125
- zh - Chinese
126+
- nl - Dutch
127+
- ko - Korean
128+
- no - Norwegian
129+
- sv - Swedish
130+
- da - Danish
131+
- uk - Ukrainian
132+
- hi - Hindi
126133

127134
### batch
128135

docs/comparison.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ How nanofaker compares to other popular faker libraries.
99
| **Bundle Size** | ~50KB | ~200-500KB | N/A (PHP) | ~100KB | ~80KB |
1010
| **Performance** | ⚡️ Fastest | Medium | N/A | Medium | Medium |
1111
| **TypeScript** | ✅ Native | ✅ Yes | ❌ No (PHP) | ⚠️ Types available | ⚠️ Types available |
12-
| **Locales** | 9 (complete) | 70+ (partial) | 50+ | Limited | Limited |
12+
| **Locales** | 16 (complete) | 70+ (partial) | 50+ | Limited | Limited |
1313
| **Locale Coverage** | 100% | 30-80% | Varies | N/A | N/A |
1414
| **CLI Tool** | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
1515
| **Tree Shaking** | ✅ Yes | ⚠️ Partial | N/A | ❌ No | ❌ No |
@@ -88,7 +88,7 @@ Chance.js: ~150ms ███████████████
8888

8989
| Library | Locales | Coverage |
9090
|---------|---------|----------|
91-
| **nanofaker** | 9 | 100% for all |
91+
| **nanofaker** | 16 | 100% for all |
9292
| @faker-js/faker | 70+ | 30-80% varies by locale |
9393
| Laravel Faker | 50+ | 50-90% varies by locale |
9494
| Chance.js | 1 | EN only |

docs/config.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ nanofaker supports the following locales with complete translations across all c
5858
- `ja` - Japanese
5959
- `tl` - Filipino
6060
- `zh` - Chinese
61+
- `nl` - Dutch
62+
- `ko` - Korean
63+
- `no` - Norwegian
64+
- `sv` - Swedish
65+
- `da` - Danish
66+
- `uk` - Ukrainian
67+
- `hi` - Hindi
6168

6269
All locales have full coverage across all 16 data categories.
6370

docs/features/locales.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ nanofaker provides comprehensive locale support with **complete translations** a
44

55
## Supported Locales
66

7-
All 9 locales have full coverage across all 16 data categories:
7+
All 16 locales have full coverage across all 16 data categories:
88

99
### English (en)
1010
- **Status**: Full coverage ✓
@@ -115,6 +115,90 @@ console.log(faker.person.fullName()) // "王伟"
115115
console.log(faker.address.city()) // "北京"
116116
```
117117

118+
### Dutch (nl)
119+
- **Status**: Full coverage ✓
120+
- **Categories**: All 16 categories fully translated
121+
122+
```ts
123+
import { faker } from 'nanofaker'
124+
125+
faker.locale = 'nl'
126+
console.log(faker.person.fullName()) // "Daan de Jong"
127+
console.log(faker.address.city()) // "Amsterdam"
128+
```
129+
130+
### Korean (ko)
131+
- **Status**: Full coverage ✓
132+
- **Categories**: All 16 categories fully translated
133+
134+
```ts
135+
import { faker } from 'nanofaker'
136+
137+
faker.locale = 'ko'
138+
console.log(faker.person.fullName()) // "김민준"
139+
console.log(faker.address.city()) // "서울"
140+
```
141+
142+
### Norwegian (no)
143+
- **Status**: Full coverage ✓
144+
- **Categories**: All 16 categories fully translated
145+
146+
```ts
147+
import { faker } from 'nanofaker'
148+
149+
faker.locale = 'no'
150+
console.log(faker.person.fullName()) // "Emma Hansen"
151+
console.log(faker.address.city()) // "Oslo"
152+
```
153+
154+
### Swedish (sv)
155+
- **Status**: Full coverage ✓
156+
- **Categories**: All 16 categories fully translated
157+
158+
```ts
159+
import { faker } from 'nanofaker'
160+
161+
faker.locale = 'sv'
162+
console.log(faker.person.fullName()) // "Alice Andersson"
163+
console.log(faker.address.city()) // "Stockholm"
164+
```
165+
166+
### Danish (da)
167+
- **Status**: Full coverage ✓
168+
- **Categories**: All 16 categories fully translated
169+
170+
```ts
171+
import { faker } from 'nanofaker'
172+
173+
faker.locale = 'da'
174+
console.log(faker.person.fullName()) // "Emma Nielsen"
175+
console.log(faker.address.city()) // "København"
176+
```
177+
178+
### Ukrainian (uk)
179+
- **Status**: Full coverage ✓
180+
- **Categories**: All 16 categories fully translated
181+
182+
```ts
183+
import { faker } from 'nanofaker'
184+
185+
faker.locale = 'uk'
186+
console.log(faker.person.fullName()) // "Олександр Шевченко"
187+
console.log(faker.address.city()) // "Київ"
188+
```
189+
190+
### Hindi (hi)
191+
- **Status**: Full coverage ✓
192+
- **Categories**: All 16 categories fully translated
193+
194+
```ts
195+
import { faker } from 'nanofaker'
196+
197+
faker.locale = 'hi'
198+
console.log(faker.person.fullName()) // "राज शर्मा"
199+
console.log(faker.address.city()) // "मुंबई"
200+
```
201+
118202
## Multi-Locale Applications
119203

120204
For applications that need to support multiple locales simultaneously, create separate instances:

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ hero:
1818
features:
1919
- title: "⚡ Performance First"
2020
icon: "🚀"
21-
details: "Built with speed in mind. 3-4x faster than alternatives with 7x smaller bundle size (~50KB vs ~350KB)."
21+
details: "Built with speed in mind."
2222

2323
- title: "🌍 Complete Locale Support"
2424
icon: "🗺️"
25-
details: "9 fully translated locales with 100% coverage across all 16 data categories. No partial translations."
25+
details: "English, Spanish, French, German, Italian, Portuguese, Japanese, Filipino, Chinese, Dutch, Korean, Norwegian, Swedish, Danish, Ukrainian, Hindi"
2626

2727
- title: "💪 Fully Typed"
2828
icon: "📝"

docs/intro.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
77
# nanofaker
88

9-
nanofaker is a modern, lightweight TypeScript library for generating fake data. Built with performance and developer experience in mind, it provides comprehensive locale support across 9 languages with complete translations for all data categories.
9+
nanofaker is a modern, lightweight TypeScript library for generating fake data. Built with performance and developer experience in mind, it provides comprehensive locale support across 16 languages with complete translations for all data categories.
1010

1111
## Why nanofaker?
1212

1313
### Performance First
1414
Built with performance as a top priority, nanofaker is optimized for speed and efficiency with minimal overhead.
1515

1616
### Comprehensive Locale Support
17-
Unlike other faker libraries with limited or incomplete translations, nanofaker provides **complete** translations across all 16 data categories for 9 different languages:
17+
Unlike other faker libraries with limited or incomplete translations, nanofaker provides **complete** translations across all 16 data categories for 16 different languages:
1818

1919
- **English (en)** - Full coverage
2020
- **Spanish (es)** - Full coverage
@@ -25,6 +25,13 @@ Unlike other faker libraries with limited or incomplete translations, nanofaker
2525
- **Japanese (ja)** - Full coverage
2626
- **Filipino (tl)** - Full coverage
2727
- **Chinese (zh)** - Full coverage
28+
- **Dutch (nl)** - Full coverage
29+
- **Korean (ko)** - Full coverage
30+
- **Norwegian (no)** - Full coverage
31+
- **Swedish (sv)** - Full coverage
32+
- **Danish (da)** - Full coverage
33+
- **Ukrainian (uk)** - Full coverage
34+
- **Hindi (hi)** - Full coverage
2835

2936
### Rich Data Categories
3037

docs/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ After migrating to nanofaker, you'll get:
436436

437437
**Smaller bundle size** - Significantly lighter than faker.js
438438
**Better performance** - Faster data generation
439-
**Complete locale coverage** - All 9 locales fully translated
439+
**Complete locale coverage** - All 16 locales fully translated
440440
**Full TypeScript support** - Better IDE autocomplete
441441
**Simpler API** - Less configuration needed
442442
**CLI tool** - Command-line data generation

docs/usage.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ console.log(chineseFaker.person.fullName()) // "王伟"
5151
- `ja` - Japanese
5252
- `tl` - Filipino
5353
- `zh` - Chinese
54+
- `nl` - Dutch
55+
- `ko` - Korean
56+
- `no` - Norwegian
57+
- `sv` - Swedish
58+
- `da` - Danish
59+
- `uk` - Ukrainian
60+
- `hi` - Hindi
5461

5562
## API Examples
5663

0 commit comments

Comments
 (0)