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-
47-
48-
49-
50-
51-
46+
```
47+
```
48+
49+
50+
51+
52+
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-
59-
60-
61-
62-
61+
```
62+
```
63+
64+
65+
66+
67+
6368
```
6469

6570
### Refactor Regex then Check Equivalence 🔄

0 commit comments

Comments
 (0)