Skip to content

Commit 1c73f7c

Browse files
authored
docs: update README
1 parent 0c25848 commit 1c73f7c

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,34 @@ import { RB } from '@gruhn/regex-utils'
3737

3838
### Generate random strings from Regex 📜
3939

40+
Generate 5 random email addresses:
4041
```typescript
41-
// Generate 5 random email addresses:
4242
const email = RB(/^[a-z]+@[a-z]+\.[a-z]{2,3}$/)
4343
for (const str of email.sample().take(5)) {
4444
console.log(str)
4545
}
46-
// ky@e.no
47-
// cc@gg.gaj
48-
// z@if.ojk
49-
// vr@y.ehl
50-
// e@zx.hzq
51-
46+
```
47+
```
48+
ky@e.no
49+
cc@gg.gaj
50+
z@if.ojk
51+
vr@y.ehl
52+
e@zx.hzq
53+
```
5254

53-
// Generate email addresses, which have exactly 20 characters:
55+
Generate 5 random email addresses, which have exactly 20 characters:
56+
```typescript
5457
const emailLength20 = email.and(/^.{20}$/)
5558
for (const str of emailLength20.sample().take(5)) {
5659
console.log(str)
5760
}
58-
// kahragjijttzyze@i.mv
59-
// gnpbjzll@cwoktvw.hhd
60-
// knqmyotxxblh@yip.ccc
61-
// kopfpstjlnbq@lal.nmi
62-
// vrskllsvblqb@gemi.wc
61+
```
62+
```
63+
kahragjijttzyze@i.mv
64+
gnpbjzll@cwoktvw.hhd
65+
knqmyotxxblh@yip.ccc
66+
kopfpstjlnbq@lal.nmi
67+
vrskllsvblqb@gemi.wc
6368
```
6469

6570
### Refactor Regex then Check Equivalence 🔄

0 commit comments

Comments
 (0)