Skip to content

Commit

Permalink
add a property to an object to mark it as a default object for the ge…
Browse files Browse the repository at this point in the history
…nerator (#35)

bump version and take out of beta
  • Loading branch information
jasond-s authored Sep 8, 2017
1 parent c9ad09b commit 1aa8c3b
Show file tree
Hide file tree
Showing 9 changed files with 3,536 additions and 122 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Options:

```javascript
let numberGenerator = new FluentFix.Generator.For.Number({
default: undefined,
min: Number.MIN_VALUE,
max: Number.MAX_VALUE,
sequential: false
Expand All @@ -128,12 +129,15 @@ let numberGenerator = new FluentFix.Generator.For.Number({

Options:

1. `min: Number` - Specify a minimum for random value.
2. `max: Number` - Specify a maximum for random value.
3. `sequential: Boolean` - Specify if you would like the random generation to be sequential.
1. `default: Number` - Specify a default number.
2. `min: Number` - Specify a minimum for random value.
3. `max: Number` - Specify a maximum for random value.
4. `sequential: Boolean` - Specify if you would like the random generation to be sequential.

### String

#### Simple

```javascript
let stringGenerator = new FluentFix.Generator.For.String(value);
```
Expand All @@ -142,10 +146,27 @@ Options:

1. `value: String` - This generator needs an example string to work.

#### Variable

```javascript
let stringGenerator = new FluentFix.Generator.For.String({
default : undefined,
min: undefined,
max: undefined,
});
```

Options:

1. `default: Date` - Specify a default string.
1. `min: Date` - Specify a minimum length for random value.
2. `max: Date` - Specify a maximum length for random value.

### Date

```javascript
let dateGenerator = new FluentFix.Generator.For.Date({
default: undefined,
min: undefined,
max: undefined,
sequential: false,
Expand All @@ -155,6 +176,7 @@ let dateGenerator = new FluentFix.Generator.For.Date({

Options:

1. `default: Date` - Specify a default date.
1. `min: Date` - Specify a minimum for random value.
2. `max: Date` - Specify a maximum for random value.
3. `sequential: Boolean` - Specify if you would like the random generation to be sequential.
Expand All @@ -164,6 +186,7 @@ Options:

```javascript
let arrayGenerator = new FluentFix.Generator.For.Array({
default: undefined,
length: 10,
depth: 1,
type: 0
Expand All @@ -172,6 +195,7 @@ let arrayGenerator = new FluentFix.Generator.For.Array({

Options:

1. `default: Array` - Specify a default array.
1. `length: Number` - The number of items for the given depth, for instance, depth 1, legth 10 will be a simple array with length 10.
2. `depth: Number` - The depth of the array, used only if complicated matrices or multidimensional arrays are necessary.
3. `type: Object|Generator` - Specify an object to be used, will be parsed as if by the object generator, or a generator may be specified.
Expand Down
Loading

0 comments on commit 1aa8c3b

Please sign in to comment.