Function
| Static Public Summary | ||
| public | dummyBasicData(): DummyData[] A function to return all basic dummy data, i.e. | |
| public | dummyBasicDataExcept(excludeTypes: ...string): DummyData[] A function to return all basic dummy data except those for zero or more given types. | |
| public | A function to return all basic dummy data that's not an object, i.e. all
dummy data tagged  | |
| public | dummyBasicPrimitivesExcept(excludeTypes: ...string): DummyData[] A function to return all basic dummy primitives except those for zero or more given types. | |
| public | Returns a single piece of dummy data, or, all the dummy data for a given type, or all the dummy data. | |
| public | dummyDataByType(typeList: ...string): DummyData[] Returns the dummy data of one or more types. | |
| public | dummyDataExcept(excludeTypes: string[], excludeTags: string[], excludeDefinitions: string[]): DummyData[] A function to return all dummy data except those for the given types and those matching the given tags tags. | |
| public | dummyDataWithAllTags(tagList: ...string): DummyData[] Returns the dummy data matching all of the given tags. | |
| public | dummyDataWithAnyTag(tagList: ...string): DummyData[] Returns the dummy data matching any of the given tags. | |
| public | Refresh the dummy data. | |
Static Public
public dummyBasicData(): DummyData[] source
A function to return all basic dummy data, i.e. all dummy data tagged
basic.
This is a shortcut for dummyDataWithAnyTag('basic').
public dummyBasicDataExcept(excludeTypes: ...string): DummyData[] source
A function to return all basic dummy data except those for zero or more given types.
Params:
| Name | Type | Attribute | Description | 
| excludeTypes | ...string | 
public dummyBasicPrimitives(): DummyData[] source
A function to return all basic dummy data that's not an object, i.e. all
dummy data tagged basic that does not have either the type or tag
object.
public dummyBasicPrimitivesExcept(excludeTypes: ...string): DummyData[] source
A function to return all basic dummy primitives except those for zero or more given types.
Params:
| Name | Type | Attribute | Description | 
| excludeTypes | ...string | 
public dummyData(path: string, opts: object): DummyData[] | DummyData | undefined source
Returns a single piece of dummy data, or, all the dummy data for a given type, or all the dummy data.
To get a single piece of dummy data pass its type and tag path as a
single period-separated string, e.g. 'string.word' for the dummy data
with type string and tag path word, or 'number.integer.negative'
for the dummy data with type number and tag path integer.negative.
To get all the dummy data for a given type pass the type as a string,
e.g. 'boolean' for all dummy boolean data.
To get all the dummy data, simply pass '*'.
When querying all the dummy data both entire sections and specific tags can be excluded, and when querying all the dummy data for a sigle type specific tags can be excluded.
Params:
| Name | Type | Attribute | Description | 
| path | string | a type, or, a type and tag path as a single
period-separated string, or the special value  | |
| opts | object | 
 | an optional options object. | 
| opts.excludeTypes | string[] | 
 | a list of types to exclude when
requesting all dummy data ( | 
| opts.excludeTags | string[] | 
 | a list of tags to exclude when requesting all dummy data, or the dummy data for a given type. | 
| opts.excludeDefinitions | string[] | 
 | a list of individual data definitions to exclude as period-separated type and tag path strings. | 
Return:
| DummyData[] | DummyData | undefined | Returns all the dummy data
for a given type, or a single piece of dummy data for a type with tag
path. If only a type is passed and that type does not exist an empty
array is returned, if the path has two or more parts and the type or
tag path don't exist,  | 
Throw:
public dummyDataByType(typeList: ...string): DummyData[] source
Returns the dummy data of one or more types.
Params:
| Name | Type | Attribute | Description | 
| typeList | ...string | 
Throw:
public dummyDataExcept(excludeTypes: string[], excludeTags: string[], excludeDefinitions: string[]): DummyData[] source
A function to return all dummy data except those for the given types and those matching the given tags tags.
This is a shortcut for:
.dummyData(
    '*',
    {
        excludeTypes: arguments[0],
        excludeTags: arguments[1],
        excludeDefinitions: arguments[2]
    }
)
public dummyDataWithAllTags(tagList: ...string): DummyData[] source
Returns the dummy data matching all of the given tags.
Params:
| Name | Type | Attribute | Description | 
| tagList | ...string | 
Throw:
public dummyDataWithAnyTag(tagList: ...string): DummyData[] source
Returns the dummy data matching any of the given tags.
Params:
| Name | Type | Attribute | Description | 
| tagList | ...string | 
Throw:
public refreshDummyData(dataGenerators: function(): Map<string, Map<string, Array>>) source
Refresh the dummy data.
Params:
| Name | Type | Attribute | Description | 
| dataGenerators | function(): Map<string, Map<string, Array>> | references to zero or more functions that return additional dummy data beyond the default set. The generators must return a data structure containing three-element arrays indexed by tag path indexed by type. The first element in the arrays must be a textual description of the piece of dummy data, the second a list of additional tags as an array of strings (the tags that make up the tag path should not be included), and the dummy data value. E.g.:  | 
 
    
  