Skip to main content

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 †
  • App.name †
  • App.version †
  • Appliance.brand †
  • Appliance.equipment †
  • AquaTeenHungerForce.character †
  • Artist.name †
  • Australia.animals †
  • Australia.locations †
  • Australia.states †
  • Avatar.image
  • Aviation.METAR †
  • Aviation.aircraft †
  • Aviation.airline †
  • Aviation.airplane †
  • Aviation.airport †
  • Aviation.airportName †
  • Aviation.armyHelicopter †
  • Aviation.cargo †
  • Aviation.civilHelicopter †
  • Aviation.engineType †
  • Aviation.flight †
  • Aviation.flightStatus †
  • Aviation.gate †
  • Aviation.general †
  • Aviation.manufacturer †
  • Aviation.specialTypeDesignator †
  • Aviation.warplane †
  • Aws.accountId †
  • Aws.acmARN †
  • Aws.albARN †
  • Aws.albTargetGroupARN †
  • Aws.region †
  • Aws.route53ZoneId †
  • Aws.securityGroupId †
  • Aws.service †
  • Aws.subnetId †
  • Aws.vpcId †
  • Azure.appServiceEnvironment †
  • Azure.appServicePlan †
  • Azure.applicationGateway †
  • Azure.bastionHost †
  • Azure.containerApps †
  • Azure.containerAppsEnvironment †
  • Azure.containerInstance †
  • Azure.containerRegistry †
  • Azure.cosmosDBDatabase †
  • Azure.firewall †
  • Azure.keyVault †
  • Azure.loadBalancer †
  • Azure.loadTesting †
  • Azure.logAnalytics †
  • Azure.managementGroup †
  • Azure.mysqlDatabase †
  • Azure.networkSecurityGroup †
  • Azure.postgreSQLDatabase †
  • Azure.region †
  • Azure.resourceGroup †
  • Azure.serviceBus †
  • Azure.serviceBusQueue †
  • Azure.serviceBusTopic †
  • Azure.springApps †
  • Azure.sqlDatabase †
  • Azure.staticWebApp †
  • Azure.storageAccount †
  • Azure.subscriptionId †
  • Azure.tenantId †
  • Azure.virtualMachine †
  • Azure.virtualNetwork †
  • Azure.virtualWan †
  • Babylon5.character †
  • Babylon5.quote †
  • BackToTheFuture.character †
  • BackToTheFuture.date †
  • BackToTheFuture.quote †
  • Barcode.ean13 †
  • Barcode.ean8 †
  • Barcode.gtin12 †
  • Barcode.gtin13 †
  • Barcode.gtin14 †
  • Barcode.gtin8 †
  • Barcode.type †
  • Baseball.coaches †
  • Baseball.players †
  • Baseball.positions †
  • Baseball.teams †
  • Basketball.coaches †
  • Basketball.players †
  • Basketball.positions †
  • Basketball.teams †
  • Battlefield1.classes †
  • Battlefield1.faction †
  • Battlefield1.map †
  • Battlefield1.vehicle †
  • Battlefield1.weapon †
  • Beer.brand †
  • Beer.hop †
  • Beer.malt †
  • Beer.name †
  • Beer.style †
  • Beer.yeast †
  • BigBangTheory.character †
  • BigBangTheory.quote †
  • BloodType.aboTypes †
  • BloodType.bloodGroup †
  • BloodType.pTypes †
  • BloodType.rhTypes †
  • Boardgame.artist †
  • Boardgame.category †
  • Boardgame.designer †
  • Boardgame.mechanic †
  • Boardgame.name †
  • Boardgame.publisher †
  • Boardgame.subdomain †
  • BojackHorseman.characters †
  • BojackHorseman.quotes †
  • BojackHorseman.tongueTwisters †
  • Book.author †
  • Book.genre †
  • Book.publisher †
  • Book.title †
  • Bool.bool
  • BossaNova.artist †
  • BossaNova.song †
  • Brand.car †
  • Brand.sport †
  • Brand.watch †
  • BreakingBad.character †
  • BreakingBad.episode †
  • BrooklynNineNine.characters †
  • BrooklynNineNine.quotes †
  • Buffy.bigBads †
  • Buffy.celebrities †
  • Buffy.characters †
  • Buffy.episodes †
  • Buffy.quotes †
  • Business.creditCardExpiry †
  • Business.creditCardNumber †
  • Business.creditCardType †
  • Business.securityCode †
  • CNPJ.invalid
  • CNPJ.valid
  • CPF.invalid
  • CPF.valid
  • Camera.brand †
  • Camera.brandWithModel †
  • Camera.model †
  • Cannabis.brands †
  • Cannabis.buzzwords †
  • Cannabis.cannabinoidAbbreviations †
  • Cannabis.cannabinoids †
  • Cannabis.categories †
  • Cannabis.healthBenefits †
  • Cannabis.medicalUses †
  • Cannabis.strains †
  • Cannabis.terpenes †
  • Cannabis.types †
  • CareProvider.hospitalName †
  • CareProvider.medicalProfession †
  • Cat.breed †
  • Cat.name †
  • Cat.registry †
  • Chess.opening †
  • Chess.player †
  • Chess.title †
  • Chess.tournament †
  • Chiquito.expressions †
  • Chiquito.jokes †
  • Chiquito.sentences †
  • Chiquito.terms †
  • ChuckNorris.fact †
  • ClashOfClans.defensiveBuilding †
  • ClashOfClans.rank †
  • ClashOfClans.troop †
  • Code.asin †
  • Code.ean13 †
  • Code.ean8 †
  • Code.gtin13 †
  • Code.gtin8 †
  • Code.imei †
  • Code.isbn10 †
  • Code.isbn13 †
  • Code.isbnGroup †
  • Code.isbnGs1 †
  • Code.isbnRegistrant †
  • Coffee.blendName †
  • Coffee.body †
  • Coffee.country †
  • Coffee.descriptor †
  • Coffee.intensifier †
  • Coffee.name1 †
  • Coffee.name2 †
  • Coffee.notes †
  • Coffee.region †
  • Coffee.variety †
  • Coin.flip †
  • Color.hex †
  • Color.name †
  • Commerce.brand †
  • Commerce.department †
  • Commerce.material †
  • Commerce.price †
  • Commerce.productName †
  • Commerce.promotionCode †
  • Commerce.vendor †
  • Community.character †
  • Community.quote †
  • Company.bs †
  • Company.buzzword †
  • Company.catchPhrase †
  • Company.industry †
  • Company.logo †
  • Company.name †
  • Company.profession †
  • Company.suffix †
  • Company.url †
  • Compass.abbreviation †
  • Compass.azimuth †
  • Compass.word †
  • Computer.brand †
  • Computer.linux †
  • Computer.macos †
  • Computer.operatingSystem †
  • Computer.platform †
  • Computer.type †
  • Computer.windows †
  • Construction.heavyEquipment †
  • Construction.materials †
  • Construction.roles †
  • Construction.standardCostCodes †
  • Construction.subcontractCategories †
  • Construction.trades †
  • Control.alteredItem †
  • Control.alteredWorldEvent †
  • Control.character †
  • Control.hiss †
  • Control.location †
  • Control.objectOfPower †
  • Control.quote †
  • Control.theBoard †
  • Cosmere.allomancers †
  • Cosmere.aons †
  • Cosmere.feruchemists †
  • Cosmere.heralds †
  • Cosmere.knightsRadiant †
  • Cosmere.metals †
  • Cosmere.shardWorlds †
  • Cosmere.shards †
  • Cosmere.sprens †
  • Cosmere.surges †
  • Country.capital †
  • Country.countryCode2 †
  • Country.countryCode3 †
  • Country.currency †
  • Country.currencyCode †
  • Country.flag †
  • Country.name †
  • CowboyBebop.character †
  • CowboyBebop.episode †
  • CowboyBebop.quote †
  • CowboyBebop.song †
  • Cricket.formats †
  • Cricket.players †
  • Cricket.teams †
  • Cricket.tournaments †
  • CryptoCoin.coin †
  • CultureSeries.books †
  • CultureSeries.civs †
  • CultureSeries.cultureShipClassAbvs †
  • CultureSeries.cultureShipClasses †
  • CultureSeries.cultureShips †
  • CultureSeries.planets †
  • Currency.code †
  • Currency.name †
  • DarkSouls.classes †
  • DarkSouls.covenants †
  • DarkSouls.shield †
  • DarkSouls.stats †
  • Date.birthday
  • Date.birthdayLocalDate
  • DcComics.hero †
  • DcComics.heroine †
  • DcComics.name †
  • DcComics.title †
  • DcComics.villain †
  • Demographic.demonym †
  • Demographic.educationalAttainment †
  • Demographic.maritalStatus †
  • Demographic.race †
  • Demographic.sex †
  • Departed.actor †
  • Departed.character †
  • Departed.quote †
  • Dessert.flavor †
  • Dessert.topping †
  • Dessert.variety †
  • DetectiveConan.characters †
  • DetectiveConan.gadgets †
  • DetectiveConan.vehicles †
  • Device.manufacturer †
  • Device.modelName †
  • Device.platform †
  • Device.serial †
  • Disease.anyDisease †
  • Disease.dermatology †
  • Disease.gynecologyAndObstetrics †
  • Disease.icd10 †
  • Disease.internalDisease †
  • Disease.neurology †
  • Disease.ophthalmologyAndOtorhinolaryngology †
  • Disease.paediatrics †
  • Disease.surgery †
  • DoctorWho.actor
  • DoctorWho.catchPhrase
  • DoctorWho.character
  • DoctorWho.doctor
  • DoctorWho.quote
  • DoctorWho.species
  • DoctorWho.villain
  • Dog.age †
  • Dog.breed †
  • Dog.coatLength †
  • Dog.gender †
  • Dog.memePhrase †
  • Dog.name †
  • Dog.size †
  • Dog.sound †
  • Doraemon.character †
  • Doraemon.gadget †
  • Doraemon.location †
  • Dota2.attribute †
  • Dota2.building †
  • Dota2.faction †
  • Dota2.hero †
  • Dota2.item †
  • Dota2.neutralItem †
  • Dota2.player †
  • Dota2.rank †
  • Dota2.team †
  • Dota2.tier †
  • DragonBall.character †
  • Drone.batteryCapacity †
  • Drone.batteryType †
  • Drone.batteryVoltage †
  • Drone.batteryWeight †
  • Drone.chargingTemperature †
  • Drone.flightTime †
  • Drone.iso †
  • Drone.maxAltitude †
  • Drone.maxAngularVelocity †
  • Drone.maxAscentSpeed †
  • Drone.maxChargingPower †
  • Drone.maxDescentSpeed †
  • Drone.maxFlightDistance †
  • Drone.maxResolution †
  • Drone.maxShutterSpeed †
  • Drone.maxSpeed †
  • Drone.maxTiltAngle †
  • Drone.maxWindResistance †
  • Drone.minShutterSpeed †
  • Drone.name †
  • Drone.operatingTemperature †
  • Drone.photoFormat †
  • Drone.shutterSpeedUnits †
  • Drone.videoFormat †
  • Drone.weight †
  • DumbAndDumber.actor †
  • DumbAndDumber.character †
  • DumbAndDumber.quote †
  • Dune.character †
  • Dune.planet †
  • Dune.quote †
  • Dune.saying †
  • Dune.title †
  • DungeonsAndDragons.alignments
  • DungeonsAndDragons.backgrounds
  • DungeonsAndDragons.cities
  • DungeonsAndDragons.klasses
  • DungeonsAndDragons.languages
  • DungeonsAndDragons.meleeWeapons
  • DungeonsAndDragons.monsters
  • DungeonsAndDragons.races
  • DungeonsAndDragons.rangedWeapons
  • Educator.campus †
  • Educator.course †
  • Educator.secondarySchool †
  • Educator.subjectWithNumber †
  • Educator.university †
  • EldenRing.location †
  • EldenRing.npc †
  • EldenRing.skill †
  • EldenRing.spell †
  • EldenRing.weapon †
  • ElderScrolls.city †
  • ElderScrolls.creature †
  • ElderScrolls.dragon †
  • ElderScrolls.firstName †
  • ElderScrolls.lastName †
  • ElderScrolls.quote †
  • ElderScrolls.race †
  • ElderScrolls.region †
  • ElectricalComponents.active †
  • ElectricalComponents.electromechanical †
  • ElectricalComponents.passive †
  • Emoji.cat †
  • Emoji.smiley †
  • Emoji.vehicle †
  • EnglandFootBall.league †
  • EnglandFootBall.team †
  • Esports.event †
  • Esports.game †
  • Esports.league †
  • Esports.player †
  • Esports.team †
  • Fallout.character †
  • Fallout.faction †
  • Fallout.location †
  • Fallout.quote †
  • FamilyGuy.character †
  • FamilyGuy.location †
  • FamilyGuy.quote †
  • FamousLastWords.lastWords †
  • File.extension †
  • File.fileName †
  • File.mimeType †
  • FinalFantasyXIV.character †
  • FinalFantasyXIV.dataCenter †
  • FinalFantasyXIV.job †
  • FinalFantasyXIV.race †
  • FinalFantasyXIV.zone †
  • FinalSpace.character †
  • FinalSpace.quote †
  • FinalSpace.vehicle †
  • Finance.bic †
  • Finance.creditCard †
  • Finance.iban †
  • Finance.nasdaqTicker †
  • Finance.nyseTicker †
  • Finance.stockMarket †
  • Finance.usRoutingNumber †
  • FinancialTerms.adjective †
  • FinancialTerms.noun †
  • FinancialTerms.verb †
  • Food.allergen †
  • Food.dish †
  • Food.fruit †
  • Food.ingredient †
  • Food.measurement †
  • Food.spice †
  • Food.sushi †
  • Food.vegetable †
  • Football.coaches †
  • Football.competitions †
  • Football.players †
  • Football.positions †
  • Football.teams †
  • Formula1.circuit †
  • Formula1.driver †
  • Formula1.grandPrix †
  • Formula1.team †
  • FreshPrinceOfBelAir.celebrities †
  • FreshPrinceOfBelAir.characters †
  • FreshPrinceOfBelAir.quotes †
  • Friends.character †
  • Friends.location †
  • Friends.quote †
  • FullmetalAlchemist.character
  • FullmetalAlchemist.city
  • FullmetalAlchemist.country
  • FunnyName.name †
  • Futurama.character †
  • Futurama.hermesCatchPhrase †
  • Futurama.location †
  • Futurama.quote †
  • GameOfThrones.character †
  • GameOfThrones.city †
  • GameOfThrones.dragon †
  • GameOfThrones.house †
  • GameOfThrones.quote †
  • GarmentSize.size †
  • Gender.binaryTypes †
  • Gender.shortBinaryTypes †
  • Gender.types †
  • Ghostbusters.actor †
  • Ghostbusters.character †
  • Ghostbusters.quote †
  • GratefulDead.players †
  • GratefulDead.songs †
  • GreekPhilosopher.name †
  • GreekPhilosopher.quote †
  • Hacker.abbreviation †
  • Hacker.adjective †
  • Hacker.ingverb †
  • Hacker.noun †
  • Hacker.verb †
  • HalfLife.character †
  • HalfLife.enemy †
  • HalfLife.location †
  • HarryPotter.book †
  • HarryPotter.character †
  • HarryPotter.house †
  • HarryPotter.location †
  • HarryPotter.quote †
  • HarryPotter.spell †
  • Hashing.md2
  • Hashing.md5
  • Hashing.sha1
  • Hashing.sha256
  • Hashing.sha384
  • Hashing.sha512
  • Hearthstone.battlegroundsScore †
  • Hearthstone.mainCharacter †
  • Hearthstone.mainPattern †
  • Hearthstone.mainProfession †
  • Hearthstone.standardRank †
  • Hearthstone.wildRank †
  • HeroesOfTheStorm.battleground †
  • HeroesOfTheStorm.hero †
  • HeroesOfTheStorm.heroClass †
  • HeroesOfTheStorm.quote †
  • HeyArnold.characters †
  • HeyArnold.locations †
  • HeyArnold.quotes †
  • Hipster.word †
  • HitchhikersGuideToTheGalaxy.character †
  • HitchhikersGuideToTheGalaxy.location †
  • HitchhikersGuideToTheGalaxy.marvinQuote †
  • HitchhikersGuideToTheGalaxy.planet †
  • HitchhikersGuideToTheGalaxy.quote †
  • HitchhikersGuideToTheGalaxy.species †
  • HitchhikersGuideToTheGalaxy.starship †
  • Hobbit.character †
  • Hobbit.location †
  • Hobbit.quote †
  • Hobbit.thorinsCompany †
  • Hobby.activity †
  • Hololive.talent †
  • Horse.breed †
  • Horse.name †
  • House.furniture †
  • House.room †
  • HowIMetYourMother.catchPhrase †
  • HowIMetYourMother.character †
  • HowIMetYourMother.highFive †
  • HowIMetYourMother.quote †
  • HowToTrainYourDragon.characters †
  • HowToTrainYourDragon.dragons †
  • HowToTrainYourDragon.locations †
  • IdNumber.inValidEnZaSsn †
  • IdNumber.invalid †
  • IdNumber.invalidEsMXSsn †
  • IdNumber.invalidPtNif †
  • IdNumber.invalidSvSeSsn †
  • IdNumber.peselNumber †
  • IdNumber.singaporeanFin †
  • IdNumber.singaporeanFinBefore2000 †
  • IdNumber.singaporeanUin †
  • IdNumber.singaporeanUinBefore2000 †
  • IdNumber.ssnValid †
  • IdNumber.valid †
  • IdNumber.validEnZaSsn †
  • IdNumber.validEsMXSsn †
  • IdNumber.validGeIDNumber †
  • IdNumber.validKoKrRrn †
  • IdNumber.validPtNif †
  • IdNumber.validSvSeSsn †
  • IdNumber.validZhCNSsn †
  • Image.base64BMP
  • Image.base64GIF
  • Image.base64JPEG
  • Image.base64JPG
  • Image.base64PNG
  • Image.base64SVG
  • Image.base64TIFF
  • IndustrySegments.industry †
  • IndustrySegments.sector †
  • IndustrySegments.subSector †
  • IndustrySegments.superSector †
  • Internet.botUserAgentAny †
  • Internet.domainName †
  • Internet.domainSuffix †
  • Internet.domainWord †
  • Internet.emailAddress †
  • Internet.emailSubject †
  • Internet.getIpV4Address †
  • Internet.getIpV6Address †
  • Internet.getPrivateIpV4Address †
  • Internet.getPublicIpV4Address †
  • Internet.httpMethod †
  • Internet.image †
  • Internet.ipV4Address †
  • Internet.ipV4Cidr †
  • Internet.ipV6Address †
  • Internet.ipV6Cidr †
  • Internet.macAddress †
  • Internet.password †
  • Internet.port †
  • Internet.privateIpV4Address †
  • Internet.publicIpV4Address †
  • Internet.safeEmailAddress †
  • Internet.slug †
  • Internet.url †
  • Internet.userAgent †
  • Internet.username †
  • Internet.uuid †
  • Internet.uuidv3 †
  • Internet.uuidv4 †
  • Internet.uuidv7 †
  • Internet.webdomain †
  • Job.field †
  • Job.keySkills †
  • Job.position †
  • Job.seniority †
  • Job.title †
  • Joke.knockKnock †
  • Joke.pun †
  • Kaamelott.character †
  • Kaamelott.quote †
  • Kpop.boyBands †
  • Kpop.girlGroups †
  • Kpop.iGroups †
  • Kpop.iiGroups †
  • Kpop.iiiGroups †
  • Kpop.solo †
  • LanguageCode.iso639
  • LargeLanguageModel.embeddingModel †
  • LargeLanguageModel.textModel †
  • LargeLanguageModel.tokenizer †
  • LeagueOfLegends.champion †
  • LeagueOfLegends.location †
  • LeagueOfLegends.masteries †
  • LeagueOfLegends.quote †
  • LeagueOfLegends.rank †
  • LeagueOfLegends.summonerSpell †
  • Lebowski.actor †
  • Lebowski.character †
  • Lebowski.quote †
  • Locality.displayName
  • Locality.localeString
  • Locality.localeStringWithoutReplacement
  • Location.building †
  • Location.nature †
  • Location.otherworldly †
  • Location.privateSpace †
  • Location.publicSpace †
  • Location.work †
  • LordOfTheRings.character †
  • LordOfTheRings.location †
  • Lorem.character †
  • Lorem.characters †
  • Lorem.paragraph †
  • Lorem.sentence †
  • Lorem.supplemental †
  • Lorem.word †
  • Lorem.words †
  • Marketing.buzzwords †
  • MarvelSnap.character †
  • MarvelSnap.event †
  • MarvelSnap.rank †
  • MarvelSnap.zone †
  • MassEffect.character †
  • MassEffect.cluster †
  • MassEffect.planet †
  • MassEffect.quote †
  • MassEffect.specie †
  • Matz.quote †
  • Mbti.characteristic †
  • Mbti.merit †
  • Mbti.name †
  • Mbti.personage †
  • Mbti.type †
  • Mbti.weakness †
  • Measurement.height †
  • Measurement.length †
  • Measurement.metricHeight †
  • Measurement.metricLength †
  • Measurement.metricVolume †
  • Measurement.metricWeight †
  • Measurement.volume †
  • Measurement.weight †
  • Medical.diagnosisCode †
  • Medical.diseaseName †
  • Medical.hospitalName †
  • Medical.medicalProfession †
  • Medical.medicineName †
  • Medical.procedureCode †
  • Medical.symptoms †
  • MedicalProcedure.icd10 †
  • Medication.drugName †
  • Military.airForceRank †
  • Military.armyRank †
  • Military.dodPaygrade †
  • Military.marinesRank †
  • Military.navyRank †
  • Minecraft.animalName †
  • Minecraft.entityName †
  • Minecraft.itemName †
  • Minecraft.monsterName †
  • Minecraft.tileItemName †
  • Minecraft.tileName †
  • Money.currency
  • Money.currencyCode
  • Money.currencyNumericCode
  • Money.currencySymbol
  • MoneyHeist.character †
  • MoneyHeist.heist †
  • MoneyHeist.quote †
  • Mood.emotion †
  • Mood.feeling †
  • Mood.tone †
  • Mountain.name †
  • Mountain.range †
  • Mountaineering.mountaineer †
  • Movie.quote †
  • Music.chord †
  • Music.genre †
  • Music.instrument †
  • Music.key †
  • Myst.ages †
  • Myst.characters †
  • Myst.creatures †
  • Myst.games †
  • Myst.quotes †
  • Name.femaleFirstName †
  • Name.firstName †
  • Name.fullName †
  • Name.lastName †
  • Name.malefirstName †
  • Name.name †
  • Name.nameWithMiddle †
  • Name.prefix †
  • Name.suffix †
  • Name.title †
  • Name.username †
  • Naruto.character †
  • Naruto.demon †
  • Naruto.eye †
  • Naruto.village †
  • Nation.capitalCity †
  • Nation.flag †
  • Nation.isoCountry †
  • Nation.isoLanguage †
  • Nation.language †
  • Nation.nationality †
  • NatoPhoneticAlphabet.codeWord †
  • NewGirl.characters †
  • NewGirl.quotes †
  • Nigeria.celebrities †
  • Nigeria.food †
  • Nigeria.name †
  • Nigeria.places †
  • Nigeria.schools †
  • Number.digit
  • Number.negative
  • Number.positive
  • Number.randomDigit
  • Number.randomDigitNotZero
  • Number.randomNumber
  • Observation.symptom †
  • OlympicSport.ancientOlympics †
  • OlympicSport.summerOlympics †
  • OlympicSport.summerParalympics †
  • OlympicSport.unusual †
  • OlympicSport.winterOlympics †
  • OlympicSport.winterParalympics †
  • OnePiece.akumasNoMi †
  • OnePiece.character †
  • OnePiece.island †
  • OnePiece.location †
  • OnePiece.quote †
  • OnePiece.sea †
  • OscarMovie.actor †
  • OscarMovie.character †
  • OscarMovie.getChoice †
  • OscarMovie.getYear †
  • OscarMovie.movieName †
  • OscarMovie.quote †
  • OscarMovie.releaseDate †
  • Overwatch.hero †
  • Overwatch.location †
  • Overwatch.quote †
  • Passport.valid †
  • PhoneNumber.cellPhone
  • PhoneNumber.cellPhoneInternational
  • PhoneNumber.extension
  • PhoneNumber.phoneNumber
  • PhoneNumber.phoneNumberInternational
  • PhoneNumber.phoneNumberNational
  • PhoneNumber.subscriberNumber
  • Photography.aperture †
  • Photography.brand †
  • Photography.camera †
  • Photography.genre †
  • Photography.imageTag †
  • Photography.iso †
  • Photography.lens †
  • Photography.shutter †
  • Photography.term †
  • Planet.atmosphericComposition †
  • Planet.axialTilt †
  • Planet.classification †
  • Planet.density †
  • Planet.discoveryYear †
  • Planet.eccentricity †
  • Planet.equatorialGravity †
  • Planet.equatorialRadius †
  • Planet.escapeVelocity †
  • Planet.gravitationParameters †
  • Planet.inclination †
  • Planet.lengthOfDay †
  • Planet.mass †
  • Planet.meanAirTemperature †
  • Planet.meanDistanceFromTheSun †
  • Planet.meanOrbitalSpeed †
  • Planet.meanSurfaceTemperature †
  • Planet.name†
  • Planet.numberOfKnownMoons †
  • Planet.orbitalPeriod †
  • Planet.planetaryDiscriminant †
  • Planet.rings †
  • Planet.rotationPeriod †
  • Planet.surfaceArea †
  • Planet.symbol †
  • Planet.volume †
  • Pokemon.location †
  • Pokemon.move †
  • Pokemon.name †
  • Pokemon.type †
  • PrincessBride.character †
  • PrincessBride.quote †
  • ProgrammingLanguage.creator †
  • ProgrammingLanguage.name †
  • Pronouns.objective †
  • Pronouns.possessive †
  • Pronouns.reflexive †
  • Pronouns.subjective †
  • RedDeadRedemption2.animal †
  • RedDeadRedemption2.gangMember †
  • RedDeadRedemption2.majorCharacter †
  • RedDeadRedemption2.protagonist †
  • RedDeadRedemption2.quote †
  • RedDeadRedemption2.region †
  • RedDeadRedemption2.settlement †
  • RedDeadRedemption2.state †
  • RedDeadRedemption2.weapon †
  • Relationship.any †
  • Relationship.direct †
  • Relationship.extended †
  • Relationship.inLaw †
  • Relationship.parent †
  • Relationship.sibling †
  • Relationship.spouse †
  • ResidentEvil.biologicalAgent †
  • ResidentEvil.character †
  • ResidentEvil.creature †
  • ResidentEvil.equipment †
  • ResidentEvil.location †
  • Restaurant.description †
  • Restaurant.name †
  • Restaurant.namePrefix †
  • Restaurant.nameSuffix †
  • Restaurant.review †
  • Restaurant.type †
  • RickAndMorty.character †
  • RickAndMorty.location †
  • RickAndMorty.quote †
  • Robin.quote †
  • RockBand.name †
  • RuPaulDragRace.queen †
  • RuPaulDragRace.quote †
  • Science.bosons †
  • Science.element †
  • Science.elementSymbol †
  • Science.leptons †
  • Science.quark †
  • Science.scientist †
  • Science.tool †
  • Science.unit †
  • Seinfeld.business †
  • Seinfeld.character †
  • Seinfeld.quote †
  • Shakespeare.asYouLikeItQuote †
  • Shakespeare.hamletQuote †
  • Shakespeare.kingRichardIIIQuote †
  • Shakespeare.romeoAndJulietQuote †
  • Show.adultMusical †
  • Show.kidsMusical †
  • Show.play †
  • SiliconValley.app †
  • SiliconValley.character †
  • SiliconValley.company †
  • SiliconValley.email †
  • SiliconValley.invention †
  • SiliconValley.motto †
  • SiliconValley.quote †
  • SiliconValley.url †
  • Simpsons.character †
  • Simpsons.location †
  • Simpsons.quote †
  • Sip.bodyBytes †
  • Sip.bodyString †
  • Sip.clientErrorResponseCode †
  • Sip.clientErrorResponsePhrase †
  • Sip.contentType †
  • Sip.globalErrorResponseCode †
  • Sip.globalErrorResponsePhrase †
  • Sip.messagingPort †
  • Sip.method †
  • Sip.nameAddress †
  • Sip.provisionalResponseCode †
  • Sip.provisionalResponsePhrase †
  • Sip.redirectResponseCode †
  • Sip.redirectResponsePhrase †
  • Sip.rtpPort †
  • Sip.serverErrorResponseCode †
  • Sip.serverErrorResponsePhrase †
  • Sip.successResponseCode †
  • Sip.successResponsePhrase †
  • Size.adjective †
  • SlackEmoji.activity †
  • SlackEmoji.celebration †
  • SlackEmoji.custom †
  • SlackEmoji.emoji †
  • SlackEmoji.foodAndDrink †
  • SlackEmoji.nature †
  • SlackEmoji.objectsAndSymbols †
  • SlackEmoji.people †
  • SlackEmoji.travelAndPlaces †
  • SonicTheHedgehog.character †
  • SonicTheHedgehog.game †
  • SonicTheHedgehog.zone †
  • SoulKnight.bosses †
  • SoulKnight.buffs †
  • SoulKnight.characters †
  • SoulKnight.enemies †
  • SoulKnight.statues †
  • SoulKnight.weapons †
  • SouthPark.characters †
  • SouthPark.quotes †
  • Space.agency †
  • Space.agencyAbbreviation †
  • Space.company †
  • Space.constellation †
  • Space.distanceMeasurement †
  • Space.galaxy †
  • Space.meteorite †
  • Space.moon †
  • Space.nasaSpaceCraft †
  • Space.nebula †
  • Space.planet †
  • Space.star †
  • Space.starCluster †
  • Spongebob.characters †
  • Spongebob.episodes †
  • Spongebob.quotes †
  • StarCraft.building †
  • StarCraft.character †
  • StarCraft.planet †
  • StarCraft.unit †
  • StarTrek.character †
  • StarTrek.klingon †
  • StarTrek.location †
  • StarTrek.species †
  • StarTrek.villain †
  • StarWars.alternateCharacterSpelling †
  • StarWars.callSign †
  • StarWars.character †
  • StarWars.droids †
  • StarWars.planets †
  • StarWars.quotes †
  • StarWars.species †
  • StarWars.vehicles †
  • StarWars.wookieWords †
  • Stargate.characters †
  • Stargate.planets †
  • Stargate.quotes †
  • Stock.exchanges †
  • Stock.lseSymbol †
  • Stock.nsdqSymbol †
  • Stock.nseSymbol †
  • Stock.nyseSymbol †
  • StrangerThings.character †
  • StrangerThings.quote †
  • StreetFighter.characters †
  • StreetFighter.moves †
  • StreetFighter.quotes †
  • StreetFighter.stages †
  • StudioGhibli.character †
  • StudioGhibli.movie †
  • StudioGhibli.quote †
  • Subscription.paymentMethods †
  • Subscription.paymentTerms †
  • Subscription.plans †
  • Subscription.statuses †
  • Subscription.subscriptionTerms †
  • Suits.characters †
  • Suits.quotes †
  • SuperMario.characters †
  • SuperMario.games †
  • SuperMario.locations †
  • SuperSmashBros.fighter †
  • SuperSmashBros.stage †
  • Superhero.descriptor †
  • Superhero.name †
  • Superhero.power †
  • Superhero.prefix †
  • Superhero.suffix †
  • Supernatural.character †
  • Supernatural.creature †
  • Supernatural.weapon †
  • SwordArtOnline.gameName †
  • SwordArtOnline.item †
  • SwordArtOnline.location †
  • SwordArtOnline.realName †
  • Tea.type †
  • Tea.variety †
  • Team.creature †
  • Team.name †
  • Team.sport †
  • Team.state †
  • Text.character
  • Text.lowercaseCharacter
  • Text.text
  • Text.uppercaseCharacter
  • TheExpanse.characters †
  • TheExpanse.locations †
  • TheExpanse.quotes †
  • TheExpanse.ships †
  • TheItCrowd.actors †
  • TheItCrowd.characters †
  • TheItCrowd.emails †
  • TheItCrowd.quotes †
  • TheKingkillerChronicle.book †
  • TheKingkillerChronicle.character †
  • TheKingkillerChronicle.creature †
  • TheKingkillerChronicle.location †
  • TheRoom.actors †
  • TheRoom.characters †
  • TheRoom.locations †
  • TheRoom.quotes †
  • TheThickOfIt.characters †
  • TheThickOfIt.departments †
  • TheThickOfIt.positions †
  • TheVentureBros.character †
  • TheVentureBros.organization †
  • TheVentureBros.quote †
  • TheVentureBros.vehicle †
  • TimeAndDate.birthday
  • TimeAndDate.future
  • TimeAndDate.past
  • Tire.aspectRatio †
  • Tire.code †
  • Tire.construction †
  • Tire.loadIndex †
  • Tire.rimSize †
  • Tire.speedrating †
  • Tire.vehicleType †
  • Tire.width †
  • Touhou.characterFirstName †
  • Touhou.characterLastName †
  • Touhou.characterName †
  • Touhou.gameName †
  • Touhou.trackName †
  • Transport.type †
  • Tron.alternateCharacterSpelling †
  • Tron.character †
  • Tron.game †
  • Tron.location †
  • Tron.quote †
  • Tron.tagline †
  • Tron.vehicle †
  • TwinPeaks.character †
  • TwinPeaks.location †
  • TwinPeaks.quote †
  • Twitter.userId †
  • Twitter.userName †
  • University.degree †
  • University.name †
  • University.place †
  • University.prefix †
  • University.suffix †
  • VForVendetta.characters †
  • VForVendetta.quotes †
  • VForVendetta.speeches †
  • Vehicle.carOptions †
  • Vehicle.carType †
  • Vehicle.color †
  • Vehicle.doors †
  • Vehicle.driveType †
  • Vehicle.engine †
  • Vehicle.fuelType †
  • Vehicle.licensePlate †
  • Vehicle.make †
  • Vehicle.makeAndModel †
  • Vehicle.manufacturer †
  • Vehicle.model †
  • Vehicle.standardSpecs †
  • Vehicle.style †
  • Vehicle.transmission †
  • Vehicle.upholstery †
  • Vehicle.upholsteryColor †
  • Vehicle.upholsteryFabric †
  • Vehicle.vin †
  • Verb.base †
  • Verb.ingForm †
  • Verb.past †
  • Verb.pastParticiple †
  • Verb.simplePresent †
  • VideoGame.genre †
  • VideoGame.platform †
  • VideoGame.title †
  • Volleyball.coach †
  • Volleyball.formation †
  • Volleyball.player †
  • Volleyball.position †
  • Volleyball.team †
  • WarhammerFantasy.creatures †
  • WarhammerFantasy.factions †
  • WarhammerFantasy.heros †
  • WarhammerFantasy.locations †
  • WarhammerFantasy.quotes †
  • Weather.description †
  • Weather.temperatureCelsius †
  • Weather.temperatureFahrenheit †
  • Witcher.book †
  • Witcher.character †
  • Witcher.location †
  • Witcher.monster †
  • Witcher.potion †
  • Witcher.quote †
  • Witcher.school †
  • Witcher.sign †
  • Witcher.witcher †
  • Word.adjective †
  • Word.adverb †
  • Word.conjunction †
  • Word.interjection †
  • Word.noun †
  • Word.preposition †
  • Word.verb †
  • WorldOfWarcraft.hero †
  • WorldOfWarcraft.quotes †
  • Yoda.quote †
  • Zelda.character †
  • Zelda.game †
  • Zodiac.sign †

Examples​

Generating string values​

Use any of the valid Datafaker expressions in #{}.

{
"_gen": "string",
"expr": "#{Name.fullName}"
}
[
"Ulysses Conn",
"Telma Huel",
"Kerry Runolfsson",
"Pearl Corkery",
"Ronny McGlynn"
]

Referring to local names​

Use names to make a map of identifiers to expressions. These identifiers can be used inside of expr and are generally useful for destructuring an object to put specific values into a string.

Local names are given preference over Datafaker expressions.

{
"topic": "sandbox",
"vars": {
"profile": {
"age": {
"_gen": "normalDistribution",
"mean": 40,
"sd": 10,
"decimals": 0
}
}
},
"value": {
"_gen": "string",
"names": {
"age": {
"_gen": "var",
"var": "profile",
"path": [
"age"
]
}
},
"expr": "I am #{age} years old"
}
}
[
"I am 40 years old",
"I am 29 years old",
"I am 30 years old",
"I am 34 years old",
"I am 38 years old"
]

Referring to vars​

Refer to variables defined in vars or varsOnce. These are given preference over Datafaker expressions, but both can be resolved in the same string.

{
"topic": "sandbox",
"vars": {
"n": {
"_gen": "uniformDistribution",
"bounds": [
1,
10
],
"decimals": 0
}
},
"value": {
"_gen": "string",
"expr": "The magic number is #{n}"
}
}
[
"The magic number is 2",
"The magic number is 1",
"The magic number is 2",
"The magic number is 1",
"The magic number is 7"
]

Calling Datafaker functions​

Some Datafaker expressions are functions that take parameters. When there's a first-class ShadowTraffic alternative function, you should use they're much less finicky to use. But if you have to, invoke them with single quotes, commas between parameters, and no spaces.

{
"_gen": "string",
"expr": "#{Date.birthday '2','4'}"
}
[
"2023-09-15 22:11:26.049729372",
"2024-07-11 11:12:10.129453623",
"2023-01-24 01:53:18.739637591",
"2023-10-12 01:54:55.309508468",
"2023-05-21 22:21:45.742588141"
]

Nesting Datafaker functions​

Datafaker has a handful of useful functions that require parameters. If you want to dynamically populate those parameters, you can nest identifiers and use names to fill them in:

{
"_gen": "string",
"expr": "#{ make }, #{Vehicle.model '#{ make }'}",
"names": {
"make": {
"_gen": "string",
"expr": "#{Vehicle.make}"
}
}
}
[
"Mercedes-Benz, C-Class",
"Buick, Regal",
"Alfa-Romeo, 159",
"Xpeng, G9",
"Renault, Twingo"
]

Transforming strings​

Use case to change the casing of generated strings, choosing one of lower, upper, or capitalized.

You can also abbreviate a string by specifying length or remove a substring with removeSubstring.

{
"lower": {
"_gen": "string",
"expr": "#{Name.fullName}",
"case": "lower"
},
"upper": {
"_gen": "string",
"expr": "#{Name.fullName}",
"case": "upper"
},
"capitalized": {
"_gen": "string",
"expr": "#{Name.fullName}",
"case": "capitalized"
},
"shortened": {
"_gen": "string",
"expr": "#{Name.fullName}",
"length": 3
},
"scrubbed": {
"_gen": "string",
"expr": "#{Name.firstName}-#{Name.lastName}",
"removeSubstring": "-"
}
}
[
{
"scrubbed": "OctaviaSchowalter",
"upper": "KIM CONN",
"capitalized": "Peter wehner ii",
"shortened": "Don",
"lower": "mr. nickolas bergnaum"
},
{
"scrubbed": "SalvadorSchultz",
"upper": "SYLVIE GLEICHNER",
"capitalized": "Wesley cartwright",
"shortened": "Kri",
"lower": "dr. wilfredo stark"
}
]

Overriding the locale​

Change the locale (default United States/English) by setting locale: first parameter is language, second is region. This example overrides the locale to Great Britain/English so that county names reflect the region.

{
"_gen": "string",
"locale": [
"en",
"gb"
],
"expr": "#{Address.county}"
}
[
"Surrey",
"Cheshire",
"North Yorkshire",
"Tayside",
"County Tyrone"
]

Specification​

JSON schema​

{
"type": "object",
"properties": {
"expr": {
"type": "string"
},
"names": {
"type": "object"
},
"case": {
"type": "string",
"enum": [
"lower",
"upper",
"capitalized"
]
},
"length": {
"type": "integer",
"minimum": 0
},
"removeSubstring": {
"type": "string"
},
"locale": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "string"
}
}
},
"required": [
"expr"
]
}