Skip to content

Commit 7859edb

Browse files
committed
🤖 chore: improve repo setup
1 parent c7b739a commit 7859edb

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `json-random`
22

3+
The `json-random` library lets you generate random JSON values.
4+
5+
- `randomString` - generates a random string following a string token template.
6+
- `TemplateJson` - generates random JSON following a template.
7+
- `RandomJson` - generates random JSON by generating new nodes and inserting them into random positions in the JSON.
8+
- `int` - generates a random integer.
9+
- `deterministic(seed, () => {})` - fixates `Math.random()` such that code in callback generates a deterministic value.
10+
311

412
## Use Cases
513

@@ -25,12 +33,18 @@ const optimizedFunction = codegen.compile();
2533
```
2634

2735

28-
# json-random
36+
## Reference
2937

30-
The `json-random` library lets you generate random JSON values.
38+
### `randomString`
39+
40+
TODO: ...
41+
42+
43+
### `TemplateJson`
3144

45+
TODO: ...
3246

33-
## Usage
47+
### `RandomJson`
3448

3549
Generate a random JSON object.
3650

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
export {deterministic, rnd} from './util';
12
export * from './RandomJson';
3+
export * from './number';
24
export * from './string';
5+
export * from './structured';

src/structured/__tests__/TemplateJson.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ describe('TemplateJson', () => {
330330
],
331331
],
332332
])) as Record<string, unknown>;
333-
console.log(map);
334333
expect(typeof map).toBe('object');
335334
const keys = Object.keys(map);
336335
for (const key of keys) {

src/structured/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './types';
2+
export {TemplateJson, TemplateJsonOpts} from './TemplateJson';

0 commit comments

Comments
 (0)