Skip to content

Commit 9f3753f

Browse files
committed
chore: rename
1 parent 8fe9f3e commit 9f3753f

File tree

174 files changed

+1298
-1162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+1298
-1162
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
uses: stacksjs/action-releaser@v1.1.0
4848
with:
4949
files: |
50-
packages/core/bin/nanofaker-linux-x64.zip
51-
packages/core/bin/nanofaker-linux-arm64.zip
52-
packages/core/bin/nanofaker-windows-x64.zip
53-
packages/core/bin/nanofaker-darwin-x64.zip
54-
packages/core/bin/nanofaker-darwin-arm64.zip
50+
packages/core/bin/mock-linux-x64.zip
51+
packages/core/bin/mock-linux-arm64.zip
52+
packages/core/bin/mock-windows-x64.zip
53+
packages/core/bin/mock-darwin-x64.zip
54+
packages/core/bin/mock-darwin-arm64.zip
5555
env:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ logs
1010
node_modules
1111
temp
1212
docs/.vitepress/cache
13-
bin/nanofaker
14-
packages/core/bin/nanofaker
13+
bin/ts-mocker
14+
packages/core/bin/ts-mocker

BENCHMARKS.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Performance Benchmarks
22

3-
Comprehensive benchmarks comparing nanofaker against other popular JavaScript/TypeScript faker libraries.
3+
Comprehensive benchmarks comparing ts-mocker against other popular JavaScript/TypeScript faker libraries.
44

55
## Latest Results
66

@@ -12,7 +12,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
1212

1313
## Summary
1414

15-
**nanofaker won 9 out of 9 benchmarks**
15+
**ts-mocker won 9 out of 9 benchmarks**
1616
**6.57x faster than @faker-js/faker on average**
1717

1818
## Detailed Results
@@ -21,7 +21,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
2121

2222
| Library | ops/s | avg time | margin | vs fastest |
2323
|---------|-------|----------|--------|------------|
24-
| **nanofaker** | 31.35M ops/s | 0.0319ms | ±0.47% | **(fastest)**|
24+
| **ts-mocker** | 31.35M ops/s | 0.0319ms | ±0.47% | **(fastest)**|
2525
| @ngneat/falso | 3.76M ops/s | 0.2659ms | ±0.95% | 0.12x |
2626
| casual | 2.61M ops/s | 0.3833ms | ±0.96% | 0.08x |
2727
| chance | 2.56M ops/s | 0.3900ms | ±1.01% | 0.08x |
@@ -31,7 +31,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
3131

3232
| Library | ops/s | avg time | margin | vs fastest |
3333
|---------|-------|----------|--------|------------|
34-
| **nanofaker** | 1.96M ops/s | 0.5098ms | ±1.43% | **(fastest)**|
34+
| **ts-mocker** | 1.96M ops/s | 0.5098ms | ±1.43% | **(fastest)**|
3535
| @ngneat/falso | 1.81M ops/s | 0.5512ms | ±1.12% | 0.92x |
3636
| casual | 1.09M ops/s | 0.9172ms | ±0.79% | 0.56x |
3737
| chance | 849.49K ops/s | 1.1772ms | ±1.43% | 0.43x |
@@ -41,7 +41,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
4141

4242
| Library | ops/s | avg time | margin | vs fastest |
4343
|---------|-------|----------|--------|------------|
44-
| **nanofaker** | 9.77M ops/s | 0.1024ms | ±1.13% | **(fastest)**|
44+
| **ts-mocker** | 9.77M ops/s | 0.1024ms | ±1.13% | **(fastest)**|
4545
| chance | 2.68M ops/s | 0.3735ms | ±1.21% | 0.27x |
4646
| @faker-js/faker | 2.05M ops/s | 0.4869ms | ±0.99% | 0.21x |
4747
| casual | 1.23M ops/s | 0.8117ms | ±0.61% | 0.13x |
@@ -51,7 +51,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
5151

5252
| Library | ops/s | avg time | margin | vs fastest |
5353
|---------|-------|----------|--------|------------|
54-
| **nanofaker** | 39.63M ops/s | 0.0252ms | ±0.58% | **(fastest)**|
54+
| **ts-mocker** | 39.63M ops/s | 0.0252ms | ±0.58% | **(fastest)**|
5555
| @ngneat/falso | 18.13M ops/s | 0.0552ms | ±1.20% | 0.46x |
5656
| casual | 1.99M ops/s | 0.5020ms | ±0.89% | 0.05x |
5757
| chance | 1.12M ops/s | 0.8969ms | ±1.19% | 0.03x |
@@ -61,7 +61,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
6161

6262
| Library | ops/s | avg time | margin | vs fastest |
6363
|---------|-------|----------|--------|------------|
64-
| **nanofaker** | 38.55M ops/s | 0.0259ms | ±0.71% | **(fastest)**|
64+
| **ts-mocker** | 38.55M ops/s | 0.0259ms | ±0.71% | **(fastest)**|
6565
| casual | 18.98M ops/s | 0.0527ms | ±1.08% | 0.49x |
6666
| @ngneat/falso | 17.93M ops/s | 0.0558ms | ±1.14% | 0.46x |
6767
| @faker-js/faker | 15.83M ops/s | 0.0632ms | ±0.80% | 0.41x |
@@ -71,7 +71,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
7171

7272
| Library | ops/s | avg time | margin | vs fastest |
7373
|---------|-------|----------|--------|------------|
74-
| **nanofaker** | 37.64M ops/s | 0.0266ms | ±1.15% | **(fastest)**|
74+
| **ts-mocker** | 37.64M ops/s | 0.0266ms | ±1.15% | **(fastest)**|
7575
| @ngneat/falso | 17.78M ops/s | 0.0562ms | ±1.09% | 0.47x |
7676
| casual | 2.32M ops/s | 0.4317ms | ±0.99% | 0.06x |
7777
| chance | 800.45K ops/s | 1.2493ms | ±1.61% | 0.02x |
@@ -81,7 +81,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
8181

8282
| Library | ops/s | avg time | margin | vs fastest |
8383
|---------|-------|----------|--------|------------|
84-
| **nanofaker** | 30.65M ops/s | 0.0326ms | ±0.98% | **(fastest)**|
84+
| **ts-mocker** | 30.65M ops/s | 0.0326ms | ±0.98% | **(fastest)**|
8585
| casual | 21.34M ops/s | 0.0469ms | ±0.65% | 0.70x |
8686
| @faker-js/faker | 17.78M ops/s | 0.0562ms | ±0.49% | 0.58x |
8787
| @ngneat/falso | 365.26K ops/s | 2.7378ms | ±0.83% | 0.01x |
@@ -90,7 +90,7 @@ Comprehensive benchmarks comparing nanofaker against other popular JavaScript/Ty
9090

9191
| Library | ops/s | avg time | margin | vs fastest |
9292
|---------|-------|----------|--------|------------|
93-
| **nanofaker** | 1.02M ops/s | 0.9849ms | ±0.26% | **(fastest)**|
93+
| **ts-mocker** | 1.02M ops/s | 0.9849ms | ±0.26% | **(fastest)**|
9494
| @ngneat/falso | 555.23K ops/s | 1.8011ms | ±0.52% | 0.55x |
9595
| @faker-js/faker | 531.61K ops/s | 1.8811ms | ±0.55% | 0.52x |
9696
| casual | 464.73K ops/s | 2.1518ms | ±0.53% | 0.46x |
@@ -108,7 +108,7 @@ Generates 10,000 complete user objects with:
108108

109109
| Library | Total Time | μs/record | vs fastest |
110110
|---------|------------|-----------|------------|
111-
| **nanofaker** | 7.97ms | 0.7975μs | **(fastest)**|
111+
| **ts-mocker** | 7.97ms | 0.7975μs | **(fastest)**|
112112
| casual | 25.44ms | 2.5442μs | 0.31x |
113113
| @ngneat/falso | 28.64ms | 2.8644μs | 0.28x |
114114
| chance | 33.12ms | 3.3117μs | 0.24x |
@@ -118,28 +118,28 @@ Generates 10,000 complete user objects with:
118118

119119
| Library | Version | Published Size | Files |
120120
|---------|---------|----------------|-------|
121-
| **nanofaker** | (core) | **174 KB** | **38** |
121+
| **ts-mocker** | (core) | **174 KB** | **38** |
122122
| **casual** | v1.6.2 | 408 KB | 75 |
123123
| **@ngneat/falso** | v7.4.0 | 1.16 MB | 399 |
124124
| **chance** | v1.1.13 | 2.08 MB | 164 |
125125
| **@faker-js/faker** | v10.0.0 | 4.29 MB | 231 |
126126

127127
### Package Size Advantages
128128

129-
nanofaker is **dramatically smaller** than all competitors:
129+
ts-mocker is **dramatically smaller** than all competitors:
130130

131131
- **24.7x smaller** than @faker-js/faker (saves 4.12 MB)
132132
- **12.0x smaller** than chance (saves 1.91 MB)
133133
- **6.7x smaller** than @ngneat/falso (saves 1.01 MB)
134134
- **2.4x smaller** than casual (saves 234 KB)
135135

136-
Even compared to the smallest competitor (casual), nanofaker is **2.4x smaller** while offering 26 full locales vs limited support.
136+
Even compared to the smallest competitor (casual), ts-mocker is **2.4x smaller** while offering 26 full locales vs limited support.
137137

138138
📦 See [PACKAGE-SIZES.md](./PACKAGE-SIZES.md) for detailed size comparison and analysis.
139139

140140
## Key Takeaways
141141

142-
### Where nanofaker Excels
142+
### Where ts-mocker Excels
143143

144144
1. **Full name generation** - 31.35M ops/s (8.3x faster than nearest competitor)
145145
2. **Phone number generation** - 9.77M ops/s (3.6x faster than nearest competitor)
@@ -151,7 +151,7 @@ Even compared to the smallest competitor (casual), nanofaker is **2.4x smaller**
151151

152152
### Performance vs @faker-js/faker
153153

154-
nanofaker is significantly faster across all categories:
154+
ts-mocker is significantly faster across all categories:
155155

156156
- **Full Name**: 58.3x faster
157157
- **Phone Number**: 4.8x faster
@@ -183,7 +183,7 @@ bun run bench
183183
- **Iterations**: Automatic (based on time budget)
184184
- **Benchmarking library**: tinybench v2.9.0
185185

186-
## Why nanofaker is Fast
186+
## Why ts-mocker is Fast
187187

188188
1. **Direct array access** - O(1) constant-time lookups
189189
2. **Minimal overhead** - Lightweight abstraction layer

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- [![npm downloads][npm-downloads-src]][npm-downloads-href] -->
77
<!-- [![Codecov][codecov-src]][codecov-href] -->
88

9-
# nanofaker
9+
# ts-mocker
1010

1111
A performance-focused and lightweight faker library for TypeScript with comprehensive locale support.
1212

@@ -64,22 +64,22 @@ A performance-focused and lightweight faker library for TypeScript with comprehe
6464

6565
```bash
6666
# npm
67-
npm install nanofaker
67+
npm install ts-mocker
6868

6969
# pnpm
70-
pnpm add nanofaker
70+
pnpm add ts-mocker
7171

7272
# bun
73-
bun add nanofaker
73+
bun add ts-mocker
7474

7575
# yarn
76-
yarn add nanofaker
76+
yarn add ts-mocker
7777
```
7878

7979
## Usage
8080

8181
```typescript
82-
import { faker } from 'nanofaker'
82+
import { faker } from 'ts-mocker'
8383

8484
// Generate random data with default locale (English)
8585
const name = faker.person.fullName()
@@ -94,7 +94,7 @@ console.log(address) // "New York"
9494
### Using Different Locales
9595

9696
```typescript
97-
import { faker } from 'nanofaker'
97+
import { faker } from 'ts-mocker'
9898

9999
// Set locale globally
100100
faker.setLocale('es') // Spanish
@@ -142,7 +142,7 @@ console.log(chineseFaker.person.fullName()) // "王伟"
142142
### API Examples
143143

144144
```typescript
145-
import { faker } from 'nanofaker'
145+
import { faker } from 'ts-mocker'
146146

147147
// Person
148148
faker.person.firstName() // Random first name
@@ -266,35 +266,35 @@ faker.science.field() // Random scientific field
266266

267267
## Command Line Interface
268268

269-
nanofaker includes a powerful CLI for generating fake data from the terminal.
269+
ts-mocker includes a powerful CLI for generating fake data from the terminal.
270270

271271
### Installation
272272

273273
```bash
274274
# Global installation
275-
npm install -g nanofaker
275+
npm install -g ts-mocker
276276

277277
# Or use with npx
278-
npx nanofaker [command]
278+
npx ts-mocker [command]
279279
```
280280

281281
### Quick Examples
282282

283283
```bash
284284
# Generate a random name
285-
nanofaker generate person fullName
285+
ts-mocker generate person fullName
286286

287287
# Generate 5 emails in Spanish
288-
nanofaker generate internet email --locale es --count 5
288+
ts-mocker generate internet email --locale es --count 5
289289

290290
# Generate 10 test users as JSON
291-
nanofaker batch 10
291+
ts-mocker batch 10
292292

293293
# List all available categories
294-
nanofaker categories
294+
ts-mocker categories
295295

296296
# List methods for a category
297-
nanofaker methods food
297+
ts-mocker methods food
298298
```
299299

300300
### Available Commands
@@ -319,23 +319,23 @@ nanofaker methods food
319319

320320
```bash
321321
# Reproducible data with seed
322-
nanofaker generate person fullName --seed 12345
322+
ts-mocker generate person fullName --seed 12345
323323

324324
# Generate products in JSON
325-
nanofaker batch 5 --template product --json
325+
ts-mocker batch 5 --template product --json
326326

327327
# Generate Japanese food items
328-
nanofaker generate food dish --locale ja --count 10
328+
ts-mocker generate food dish --locale ja --count 10
329329

330330
# Save to file
331-
nanofaker batch 100 --template user > users.json
331+
ts-mocker batch 100 --template user > users.json
332332
```
333333

334-
See the [CLI documentation](https://nanofaker.stacksjs.org/cli) for complete details.
334+
See the [CLI documentation](https://ts-mocker.stacksjs.org/cli) for complete details.
335335

336336
## Performance Benchmarks
337337

338-
nanofaker is designed for performance and efficiency:
338+
ts-mocker is designed for performance and efficiency:
339339

340340
**Performance:**
341341

@@ -355,7 +355,7 @@ nanofaker is designed for performance and efficiency:
355355

356356
### Quick Comparison
357357

358-
| Operation | nanofaker | @faker-js/faker | Speedup |
358+
| Operation | ts-mocker | @faker-js/faker | Speedup |
359359
|-----------|-----------|-----------------|---------|
360360
| UUID Generation | 20.50M ops/s | 497.69K ops/s | **41.2x faster** |
361361
| Full Name Generation | 24.76M ops/s | 678.37K ops/s | **36.5x faster** |
@@ -404,7 +404,7 @@ bun run lint
404404

405405
## Changelog
406406

407-
Please see our [releases](https://github.com/stacksjs/nanofaker/releases) page for more information on what has changed recently.
407+
Please see our [releases](https://github.com/stacksjs/ts-mocker/releases) page for more information on what has changed recently.
408408

409409
## Contributing
410410

@@ -414,7 +414,7 @@ We welcome contributions! Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for
414414

415415
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
416416

417-
[Discussions on GitHub](https://github.com/stacksjs/nanofaker/discussions)
417+
[Discussions on GitHub](https://github.com/stacksjs/ts-mocker/discussions)
418418

419419
For casual chit-chat with others using this package:
420420

@@ -440,10 +440,10 @@ The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
440440
Made with 💙
441441

442442
<!-- Badges -->
443-
[npm-version-src]: https://img.shields.io/npm/v/nanofaker?style=flat-square
444-
[npm-version-href]: https://npmjs.com/package/nanofaker
445-
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/nanofaker/ci.yml?style=flat-square&branch=main
446-
[github-actions-href]: https://github.com/stacksjs/nanofaker/actions?query=workflow%3Aci
443+
[npm-version-src]: https://img.shields.io/npm/v/ts-mocker?style=flat-square
444+
[npm-version-href]: https://npmjs.com/package/ts-mocker
445+
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/ts-mocker/ci.yml?style=flat-square&branch=main
446+
[github-actions-href]: https://github.com/stacksjs/ts-mocker/actions?query=workflow%3Aci
447447

448-
<!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/nanofaker/main?style=flat-square
449-
[codecov-href]: https://codecov.io/gh/stacksjs/nanofaker -->
448+
<!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/ts-mocker/main?style=flat-square
449+
[codecov-href]: https://codecov.io/gh/stacksjs/ts-mocker -->

buddy-bot.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { BuddyBotConfig } from 'buddy-bot'
33
const config: BuddyBotConfig = {
44
repository: {
55
owner: 'stacksjs',
6-
name: 'nanofaker',
6+
name: 'ts-mocker',
77
provider: 'github',
88
// token: process.env.BUDDY_BOT_TOKEN,
99
},

0 commit comments

Comments
 (0)