Skip to content

Commit

Permalink
Document ipV4/ipV6 arbiraries
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz committed Mar 27, 2019
1 parent bd719b0 commit 032355e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion documentation/Arbitraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ Multiple characters:
- `fc.fullUnicodeString()`, `fc.fullUnicodeString(maxLength: number)` or `fc.fullUnicodeString(minLength: number, maxLength: number)` string based on characters generated by `fc.fullUnicode()`. Be aware that the length is considered in terms of the number of glyphs in the string and not the number of UTF-16 characters
- `fc.stringOf(charArb: Arbitrary<string>)`, `fc.stringOf(charArb: Arbitrary<string>, maxLength: number)` or `fc.stringOf(charArb: Arbitrary<string>, minLength: number, maxLength: number)` string based on characters generated by `charArb`. `minLength` and `maxLength` define bounds of the number of elements generated using `charArb` that can be found in the final string

Strings that mimic real strings, with words and sentences:
More specific strings:

- `fc.json()` or `fc.json(maxDepth: number)` json strings having keys generated using `fc.string()`. String values are also produced by `fc.string()`
- `fc.unicodeJson()` or `fc.unicodeJson(maxDepth: number)` json strings having keys generated using `fc.unicodeString()`. String values are also produced by `fc.unicodeString()`
- `fc.lorem()`, `fc.lorem(maxWordsCount: number)` or `fc.lorem(maxWordsCount: number, sentencesMode: boolean)` lorem ipsum strings. Generator can be configured by giving it a maximum number of characters by using `maxWordsCount` or switching the mode to sentences by setting `sentencesMode` to `true` in which case `maxWordsCount` is used to cap the number of sentences allowed
- `fc.ipV4()` IP v4 strings
- `fc.ipV6()` IP v6 strings

## Combinors of arbitraries (:T)

Expand Down

0 comments on commit 032355e

Please sign in to comment.