Scalar functions
string
Commentary
added in 0.0.5
Generates strings which may be templated with #{}, containing the names of local identifiers 1, variables 2, or Java Datafaker expressions 3 (Datafaker version 2.4.1). Local identifiers will be resolved first, then vars, then Faker expressions.
Datafaker functions that take parameters must be invoked with single quotes and no spaces, as in #{Date.birthday '2','4'}. 4
By contrast to Datafaker's out-of-the-box expression language, ShadowTraffic preprocesses expression strings so that you can nest identifiers, which is especially useful if you want to do nested function calls. 5
You may occasionally want to change the shape of the strings Datafaker generates. The string function supports a handful of transforms. 6
By default, strings are generated with a locale configured for United States English, but you can override this. 7
Faker expressions and values
Use any of these expressions in the form of #{expr}. Where applicable, links are supplied to the literal value list within the Datafaker project.
- Address.buildingNumber †
 - Address.city †
 - Address.cityName †
 - Address.cityPrefix †
 - Address.citySuffix †
 - Address.country †
 - Address.countryCode †
 - Address.fullAddress †
 - Address.latLon †
 - Address.latitude †
 - Address.lonLat †
 - Address.longitude †
 - Address.mailBox †
 - Address.postcode †
 - Address.secondaryAddress †
 - Address.state †
 - Address.stateAbbr †
 - Address.streetAddress †
 - Address.streetAddressNumber †
 - Address.streetName †
 - Address.streetPrefix †
 - Address.streetSuffix †
 - Address.timeZone †
 - Address.zipCode †
 - Address.zipCodePlus4 †
 - Ancient.god †
 - Ancient.hero †
 - Ancient.primordial †
 - Ancient.titan †
 - Animal.genus †
 - Animal.name †
 - Animal.scientificName †
 - Animal.species †
 - App.author