From d34136a193c0db987dc0862dc99a71ba89f37208 Mon Sep 17 00:00:00 2001 From: "lukasz.klejszta" Date: Tue, 19 Jul 2022 12:57:12 +0200 Subject: [PATCH] feat: generate --- packages/falso/src/lib/abbreviation.ts | 6 ++--- packages/falso/src/lib/accessory.ts | 4 +++ packages/falso/src/lib/account.ts | 6 ++--- packages/falso/src/lib/airline.ts | 4 +++ packages/falso/src/lib/airport.ts | 19 ++++++++++++++ packages/falso/src/lib/alpha-numeric.ts | 4 +++ packages/falso/src/lib/alpha.ts | 4 +++ .../falso/src/lib/american-football-team.ts | 4 +++ packages/falso/src/lib/amount.ts | 4 +++ packages/falso/src/lib/animal-type.ts | 4 +++ packages/falso/src/lib/avatar.ts | 4 +++ packages/falso/src/lib/aws-region.ts | 4 +++ packages/falso/src/lib/aws-request-id.ts | 4 +++ packages/falso/src/lib/aws-service.ts | 4 +++ packages/falso/src/lib/baseball-team.ts | 4 +++ packages/falso/src/lib/basketball-team.ts | 4 +++ packages/falso/src/lib/bear.ts | 4 +++ packages/falso/src/lib/binary.ts | 4 +++ packages/falso/src/lib/bitcoin-address.ts | 4 +++ packages/falso/src/lib/book.ts | 16 ++++++++++++ packages/falso/src/lib/boolean.ts | 4 +++ packages/falso/src/lib/brand.ts | 4 +++ packages/falso/src/lib/browser.ts | 4 +++ packages/falso/src/lib/cardinal-direction.ts | 4 +++ packages/falso/src/lib/cat.ts | 4 +++ packages/falso/src/lib/catch-phrase.ts | 4 +++ packages/falso/src/lib/cetacean.ts | 4 +++ packages/falso/src/lib/city.ts | 4 +++ packages/falso/src/lib/clothing-size.ts | 4 +++ packages/falso/src/lib/color.ts | 4 +++ packages/falso/src/lib/company-name.ts | 4 +++ packages/falso/src/lib/country-code.ts | 4 +++ packages/falso/src/lib/country.ts | 4 +++ packages/falso/src/lib/county.ts | 4 +++ packages/falso/src/lib/cow.ts | 4 +++ packages/falso/src/lib/credit-card-brand.ts | 4 +++ packages/falso/src/lib/credit-card-cvv.ts | 4 +++ packages/falso/src/lib/credit-card-number.ts | 26 +++++++++++++++++++ packages/falso/src/lib/crocodilia.ts | 4 +++ packages/falso/src/lib/currency-code.ts | 4 +++ packages/falso/src/lib/currency-name.ts | 4 +++ packages/falso/src/lib/currency-symbol.ts | 4 +++ packages/falso/src/lib/database-collation.ts | 4 +++ packages/falso/src/lib/database-column.ts | 4 +++ packages/falso/src/lib/database-engine.ts | 4 +++ packages/falso/src/lib/database-type.ts | 4 +++ packages/falso/src/lib/department.ts | 4 +++ packages/falso/src/lib/direction.ts | 4 +++ packages/falso/src/lib/directory-path.ts | 4 +++ packages/falso/src/lib/dog.ts | 4 +++ packages/falso/src/lib/domain-suffix.ts | 4 +++ packages/falso/src/lib/drinks.ts | 4 +++ packages/falso/src/lib/email-provider.ts | 4 +++ packages/falso/src/lib/emoji.ts | 4 +++ packages/falso/src/lib/ethereum-address.ts | 4 +++ packages/falso/src/lib/file-ext.ts | 4 +++ packages/falso/src/lib/file-name.ts | 4 +++ packages/falso/src/lib/file-path.ts | 4 +++ packages/falso/src/lib/file-type.ts | 4 +++ packages/falso/src/lib/fish.ts | 4 +++ packages/falso/src/lib/float.ts | 4 +++ packages/falso/src/lib/font-family.ts | 4 +++ packages/falso/src/lib/font-size.ts | 4 +++ packages/falso/src/lib/football-team.ts | 4 +++ packages/falso/src/lib/frequency.ts | 4 +++ packages/falso/src/lib/future-date.ts | 4 +++ packages/falso/src/lib/gender.ts | 4 +++ packages/falso/src/lib/git-branch.ts | 4 +++ packages/falso/src/lib/git-commit-sha.ts | 4 +++ packages/falso/src/lib/git-short-sha.ts | 4 +++ packages/falso/src/lib/hex.ts | 4 +++ packages/falso/src/lib/hexa-decimal.ts | 4 +++ packages/falso/src/lib/horse.ts | 4 +++ packages/falso/src/lib/hsl.ts | 4 +++ packages/falso/src/lib/http-method.ts | 4 +++ packages/falso/src/lib/ice-hockey-team.ts | 4 +++ packages/falso/src/lib/img.ts | 4 +++ packages/falso/src/lib/integration.ts | 4 +++ packages/falso/src/lib/ip.ts | 4 +++ packages/falso/src/lib/ipv6.ts | 4 +++ packages/falso/src/lib/job-area.ts | 4 +++ packages/falso/src/lib/job-descriptor.ts | 4 +++ packages/falso/src/lib/job-title.ts | 4 +++ packages/falso/src/lib/job-type.ts | 4 +++ packages/falso/src/lib/language.ts | 4 +++ packages/falso/src/lib/latitude.ts | 4 +++ packages/falso/src/lib/lines.ts | 4 +++ packages/falso/src/lib/lion.ts | 4 +++ packages/falso/src/lib/locale.ts | 4 +++ packages/falso/src/lib/longitude.ts | 4 +++ packages/falso/src/lib/mac.ts | 4 +++ packages/falso/src/lib/mask.ts | 4 +++ packages/falso/src/lib/mime-type.ts | 4 +++ packages/falso/src/lib/month.ts | 4 +++ packages/falso/src/lib/movie-character.ts | 4 +++ packages/falso/src/lib/movie.ts | 4 +++ packages/falso/src/lib/music-genre.ts | 4 +++ .../falso/src/lib/nearby-gpscoordinate.ts | 4 +++ packages/falso/src/lib/number.ts | 4 +++ packages/falso/src/lib/oauth-provider.ts | 4 +++ packages/falso/src/lib/octal.ts | 4 +++ packages/falso/src/lib/ordinal-direction.ts | 4 +++ packages/falso/src/lib/paragraph.ts | 4 +++ packages/falso/src/lib/password.ts | 4 +++ packages/falso/src/lib/past-date.ts | 4 +++ packages/falso/src/lib/permission.ts | 4 +++ packages/falso/src/lib/person-title.ts | 4 +++ packages/falso/src/lib/phone-number.ts | 7 +++++ packages/falso/src/lib/phrase.ts | 4 +++ packages/falso/src/lib/port.ts | 4 +++ packages/falso/src/lib/priority.ts | 4 +++ packages/falso/src/lib/product-adjective.ts | 4 +++ packages/falso/src/lib/product-category.ts | 4 +++ packages/falso/src/lib/product-description.ts | 4 +++ packages/falso/src/lib/product-material.ts | 4 +++ packages/falso/src/lib/product-name.ts | 4 +++ packages/falso/src/lib/product.ts | 4 +++ .../falso/src/lib/programming-language.ts | 4 +++ packages/falso/src/lib/pronoun.ts | 4 +++ packages/falso/src/lib/protocol.ts | 4 +++ packages/falso/src/lib/quote.ts | 4 +++ packages/falso/src/lib/rabbit.ts | 4 +++ packages/falso/src/lib/random.ts | 21 +++------------ packages/falso/src/lib/recent-date.ts | 4 +++ packages/falso/src/lib/rgb.ts | 4 +++ packages/falso/src/lib/role.ts | 4 +++ packages/falso/src/lib/routing-number.ts | 4 +++ packages/falso/src/lib/seat-number.ts | 4 +++ packages/falso/src/lib/semver.ts | 4 +++ packages/falso/src/lib/sentence.ts | 4 +++ packages/falso/src/lib/sequence.ts | 4 +++ packages/falso/src/lib/shape.ts | 4 +++ packages/falso/src/lib/singer.ts | 4 +++ packages/falso/src/lib/skill.ts | 4 +++ packages/falso/src/lib/snake.ts | 4 +++ packages/falso/src/lib/social.ts | 6 ++++- packages/falso/src/lib/song.ts | 4 +++ packages/falso/src/lib/soon-date.ts | 4 +++ packages/falso/src/lib/state-abbr.ts | 4 +++ packages/falso/src/lib/state.ts | 4 +++ packages/falso/src/lib/status.ts | 5 ++++ packages/falso/src/lib/street-name.ts | 4 +++ packages/falso/src/lib/subscription-plan.ts | 4 +++ packages/falso/src/lib/superhero.ts | 4 +++ packages/falso/src/lib/svg.ts | 4 +++ packages/falso/src/lib/time-zone.ts | 4 +++ packages/falso/src/lib/transaction-type.ts | 4 +++ packages/falso/src/lib/user-agent.ts | 4 +++ packages/falso/src/lib/uuid.ts | 4 +++ packages/falso/src/lib/vehicle-fuel.ts | 4 +++ .../falso/src/lib/vehicle-manufacturer.ts | 4 +++ packages/falso/src/lib/vehicle-model.ts | 4 +++ packages/falso/src/lib/vehicle-type.ts | 4 +++ packages/falso/src/lib/vehicle.ts | 4 +++ packages/falso/src/lib/verb.ts | 4 +++ packages/falso/src/lib/weekday.ts | 4 +++ packages/falso/src/lib/word.ts | 4 +++ packages/falso/src/lib/zip-code.ts | 4 +++ scripts/example-generator.js | 24 +++++++++++------ 159 files changed, 699 insertions(+), 33 deletions(-) diff --git a/packages/falso/src/lib/abbreviation.ts b/packages/falso/src/lib/abbreviation.ts index 11b84449..3a9da884 100644 --- a/packages/falso/src/lib/abbreviation.ts +++ b/packages/falso/src/lib/abbreviation.ts @@ -16,9 +16,9 @@ import { data } from './abbreviation.json'; * * @automaticallyGeneratedExamples * @example - * SCSI - * SMTP - * ADP + * 'SCSI' + * 'SMTP' + * 'ADP' */ export function randAbbreviation(options?: O) { diff --git a/packages/falso/src/lib/accessory.ts b/packages/falso/src/lib/accessory.ts index 646e2f09..9273445c 100644 --- a/packages/falso/src/lib/accessory.ts +++ b/packages/falso/src/lib/accessory.ts @@ -16,6 +16,10 @@ import { data } from './accessory.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Sunglasses' + * 'Apron' + * 'Necklace' */ export function randAccessory( diff --git a/packages/falso/src/lib/account.ts b/packages/falso/src/lib/account.ts index 934e5545..6c4a0350 100644 --- a/packages/falso/src/lib/account.ts +++ b/packages/falso/src/lib/account.ts @@ -23,9 +23,9 @@ export interface AccountOptions extends FakeOptions { * * @automaticallyGeneratedExamples * @example - * 473138897 - * 937452680 - * 108248170 + * 316396831 + * 336461842 + * 864320942 */ export function randAccount( diff --git a/packages/falso/src/lib/airline.ts b/packages/falso/src/lib/airline.ts index 8136c5f6..c22a4f35 100644 --- a/packages/falso/src/lib/airline.ts +++ b/packages/falso/src/lib/airline.ts @@ -16,6 +16,10 @@ import { data } from './airline.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Aeroflot' + * 'Air Canada' + * 'Air Europa' */ export function randAirline( diff --git a/packages/falso/src/lib/airport.ts b/packages/falso/src/lib/airport.ts index 422037be..43dec6e5 100644 --- a/packages/falso/src/lib/airport.ts +++ b/packages/falso/src/lib/airport.ts @@ -23,6 +23,25 @@ export interface Airport { * * * @automaticallyGeneratedExamples + * @example + * { + name: 'Hartsfield–Jackson Atlanta International Airport', + code: 'ATL', + city: 'Atlanta', + country: 'United States' +} + * { + name: 'Los Angeles International Airport', + code: 'LAX', + city: 'Los Angeles', + country: 'United States' +} + * { + name: "O'Hare International Airport", + code: 'ORD', + city: 'Chicago', + country: 'United States' +} */ export function randAirport( diff --git a/packages/falso/src/lib/alpha-numeric.ts b/packages/falso/src/lib/alpha-numeric.ts index a7290055..957898b5 100644 --- a/packages/falso/src/lib/alpha-numeric.ts +++ b/packages/falso/src/lib/alpha-numeric.ts @@ -18,6 +18,10 @@ import { randNumber } from './number'; * * * @automaticallyGeneratedExamples + * @example + * o + * e + * 9 */ export function randAlphaNumeric( diff --git a/packages/falso/src/lib/alpha.ts b/packages/falso/src/lib/alpha.ts index e88f6f09..6ba49660 100644 --- a/packages/falso/src/lib/alpha.ts +++ b/packages/falso/src/lib/alpha.ts @@ -16,6 +16,10 @@ import { alphaChars } from './sequence'; * * * @automaticallyGeneratedExamples + * @example + * g + * g + * l */ export function randAlpha( diff --git a/packages/falso/src/lib/american-football-team.ts b/packages/falso/src/lib/american-football-team.ts index 41c5bee2..aa1df96c 100644 --- a/packages/falso/src/lib/american-football-team.ts +++ b/packages/falso/src/lib/american-football-team.ts @@ -16,6 +16,10 @@ import { data } from './american-football-team.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Arizona Cardinals' + * 'Atlanta Falcons' + * 'Baltimore Ravens' */ export function randAmericanFootballTeam( diff --git a/packages/falso/src/lib/amount.ts b/packages/falso/src/lib/amount.ts index 68681d03..a048611e 100644 --- a/packages/falso/src/lib/amount.ts +++ b/packages/falso/src/lib/amount.ts @@ -37,6 +37,10 @@ export interface RandomAmountOptions extends RandomInRangeOptions, FakeOptions { * randAmount({ length: 10 }) * * @automaticallyGeneratedExamples + * @example + * 8672.63 + * 3284.82 + * 9879.79 */ export function randAmount< diff --git a/packages/falso/src/lib/animal-type.ts b/packages/falso/src/lib/animal-type.ts index fb3698e7..a94b7be9 100644 --- a/packages/falso/src/lib/animal-type.ts +++ b/packages/falso/src/lib/animal-type.ts @@ -16,6 +16,10 @@ import { data } from './animal-type.json'; * * * @automaticallyGeneratedExamples + * @example + * 'bird' + * 'cetacean' + * 'rabbit' */ export function randAnimalType( diff --git a/packages/falso/src/lib/avatar.ts b/packages/falso/src/lib/avatar.ts index ae08b8f0..bbb8de30 100644 --- a/packages/falso/src/lib/avatar.ts +++ b/packages/falso/src/lib/avatar.ts @@ -23,6 +23,10 @@ interface AvatarOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * https://i.pravatar.cc/100 + * https://i.pravatar.cc/100 + * https://i.pravatar.cc/100 */ export function randAvatar( diff --git a/packages/falso/src/lib/aws-region.ts b/packages/falso/src/lib/aws-region.ts index f9fd5e4f..6d349c8f 100644 --- a/packages/falso/src/lib/aws-region.ts +++ b/packages/falso/src/lib/aws-region.ts @@ -16,6 +16,10 @@ import { data } from './aws-region.json'; * * * @automaticallyGeneratedExamples + * @example + * 'us-east-2' + * 'us-east-1' + * 'us-west-1' */ export function randAwsRegion( diff --git a/packages/falso/src/lib/aws-request-id.ts b/packages/falso/src/lib/aws-request-id.ts index 997971f0..be153a41 100644 --- a/packages/falso/src/lib/aws-request-id.ts +++ b/packages/falso/src/lib/aws-request-id.ts @@ -16,6 +16,10 @@ import { fake, FakeOptions } from './core/core'; * * * @automaticallyGeneratedExamples + * @example + * 788k7v21-fa9h-0y1h-x6l8-rs8dpe1efc4y + * 5s3mlim3-737x-8ol6-d282-mg88umn271x5 + * nm1dvo6p-uuj3-1l62-e131-lu249e634825 */ export function randAwsRequestId( diff --git a/packages/falso/src/lib/aws-service.ts b/packages/falso/src/lib/aws-service.ts index dafac553..0a353cb4 100644 --- a/packages/falso/src/lib/aws-service.ts +++ b/packages/falso/src/lib/aws-service.ts @@ -16,6 +16,10 @@ import { data } from './aws-service.json'; * * * @automaticallyGeneratedExamples + * @example + * 'EC2' + * 'RDS' + * 'S3' */ export function randAwsService( diff --git a/packages/falso/src/lib/baseball-team.ts b/packages/falso/src/lib/baseball-team.ts index 385048a2..e961dbeb 100644 --- a/packages/falso/src/lib/baseball-team.ts +++ b/packages/falso/src/lib/baseball-team.ts @@ -16,6 +16,10 @@ import { data } from './baseball-team.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Arizona Diamondbacks' + * 'Atlanta Braves' + * 'Baltimore Orioles' */ export function randBaseballTeam( diff --git a/packages/falso/src/lib/basketball-team.ts b/packages/falso/src/lib/basketball-team.ts index 621ae663..d7e6acac 100644 --- a/packages/falso/src/lib/basketball-team.ts +++ b/packages/falso/src/lib/basketball-team.ts @@ -16,6 +16,10 @@ import { data } from './basketball-team.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Atlanta Hawks' + * 'Boston Celtics' + * 'Brooklyn Nets' */ export function randBasketballTeam( diff --git a/packages/falso/src/lib/bear.ts b/packages/falso/src/lib/bear.ts index e89113c5..403748c4 100644 --- a/packages/falso/src/lib/bear.ts +++ b/packages/falso/src/lib/bear.ts @@ -16,6 +16,10 @@ import { data } from './bear.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Spectacled bear' + * 'Brown bear' + * 'Asian black bear' */ export function randBear( diff --git a/packages/falso/src/lib/binary.ts b/packages/falso/src/lib/binary.ts index 171efa04..ad80dec5 100644 --- a/packages/falso/src/lib/binary.ts +++ b/packages/falso/src/lib/binary.ts @@ -15,6 +15,10 @@ import { FakeOptions, fake, getRandomInRange } from './core/core'; * * * @automaticallyGeneratedExamples + * @example + * 10010000100010100000011001101101000111010010001000100 + * 1011010110110110110010000110110101111111101111011100 + * 1000000100101111001100101001010111000001000000101010 */ export function randBinary( diff --git a/packages/falso/src/lib/bitcoin-address.ts b/packages/falso/src/lib/bitcoin-address.ts index 04871500..ba5db115 100644 --- a/packages/falso/src/lib/bitcoin-address.ts +++ b/packages/falso/src/lib/bitcoin-address.ts @@ -16,6 +16,10 @@ import { randSequence } from './sequence'; * * * @automaticallyGeneratedExamples + * @example + * BiBwVceNYUIzZiIM3iT5Pfa11H9eXIeBN + * 4LWPPHhYOB0OIJg8gMamYBCkVWCe96TBn + * RDdJ4ZMgtiT6KnSmAAncSlpgr2DlOMV8V */ export function randBitcoinAddress( diff --git a/packages/falso/src/lib/book.ts b/packages/falso/src/lib/book.ts index b92da542..9ab67509 100644 --- a/packages/falso/src/lib/book.ts +++ b/packages/falso/src/lib/book.ts @@ -37,6 +37,22 @@ export interface Book { * * * @automaticallyGeneratedExamples + * @example + * { + title: 'The Adventures of Augie March', + author: 'Saul Bellow', + category: 'Comedy' +} + * { + title: 'The Uncommon Reader', + author: 'Alan Bennett', + category: 'Comedy' +} + * { + title: 'Don Quixote', + author: 'Miguel de Cervantes', + category: 'Comedy' +} */ export function randBook( diff --git a/packages/falso/src/lib/boolean.ts b/packages/falso/src/lib/boolean.ts index 7357d101..e1892e67 100644 --- a/packages/falso/src/lib/boolean.ts +++ b/packages/falso/src/lib/boolean.ts @@ -15,6 +15,10 @@ import { fake, FakeOptions, randElement } from './core/core'; * * * @automaticallyGeneratedExamples + * @example + * true + * false + * false */ export function randBoolean( diff --git a/packages/falso/src/lib/brand.ts b/packages/falso/src/lib/brand.ts index 293e4cc8..95759e37 100644 --- a/packages/falso/src/lib/brand.ts +++ b/packages/falso/src/lib/brand.ts @@ -16,6 +16,10 @@ import { data } from './brand.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Apple' + * 'Amazon' + * 'Microsoft' */ export function randBrand( diff --git a/packages/falso/src/lib/browser.ts b/packages/falso/src/lib/browser.ts index bef65d34..6f4c86f4 100644 --- a/packages/falso/src/lib/browser.ts +++ b/packages/falso/src/lib/browser.ts @@ -16,6 +16,10 @@ import { data } from './browser.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Chrome' + * 'Edge' + * 'Firefox' */ export function randBrowser( diff --git a/packages/falso/src/lib/cardinal-direction.ts b/packages/falso/src/lib/cardinal-direction.ts index eac39c08..d080469a 100644 --- a/packages/falso/src/lib/cardinal-direction.ts +++ b/packages/falso/src/lib/cardinal-direction.ts @@ -16,6 +16,10 @@ import { data } from './cardinal-direction.json'; * * * @automaticallyGeneratedExamples + * @example + * 'East' + * 'South' + * 'West' */ export function randCardinalDirection( diff --git a/packages/falso/src/lib/cat.ts b/packages/falso/src/lib/cat.ts index aa74400c..23f76247 100644 --- a/packages/falso/src/lib/cat.ts +++ b/packages/falso/src/lib/cat.ts @@ -16,6 +16,10 @@ import { data } from './cat.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Japanese Bobtail' + * 'Savannah' + * 'LaPerm' */ export function randCat( diff --git a/packages/falso/src/lib/catch-phrase.ts b/packages/falso/src/lib/catch-phrase.ts index 1aadf7e9..5fe3ae27 100644 --- a/packages/falso/src/lib/catch-phrase.ts +++ b/packages/falso/src/lib/catch-phrase.ts @@ -16,6 +16,10 @@ import { data } from './catch-phrase.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Persevering encompassing middleware' + * 'Multi-layered zero administration system engine' + * 'Digitized attitude-oriented implementation' */ export function randCatchPhrase( diff --git a/packages/falso/src/lib/cetacean.ts b/packages/falso/src/lib/cetacean.ts index ba77a4bd..ae25e30f 100644 --- a/packages/falso/src/lib/cetacean.ts +++ b/packages/falso/src/lib/cetacean.ts @@ -16,6 +16,10 @@ import { data } from './cetacean.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Clymene Dolphin' + * 'Bottlenose Dolphin' + * 'Costero' */ export function randCetacean( diff --git a/packages/falso/src/lib/city.ts b/packages/falso/src/lib/city.ts index 679d4ac7..5e6af626 100644 --- a/packages/falso/src/lib/city.ts +++ b/packages/falso/src/lib/city.ts @@ -16,6 +16,10 @@ import { data } from './city.json'; * * * @automaticallyGeneratedExamples + * @example + * 'South Dagmarshire' + * 'New Solonmouth' + * 'New Montemouth' */ export function randCity( diff --git a/packages/falso/src/lib/clothing-size.ts b/packages/falso/src/lib/clothing-size.ts index afeddc6a..23688b78 100644 --- a/packages/falso/src/lib/clothing-size.ts +++ b/packages/falso/src/lib/clothing-size.ts @@ -16,6 +16,10 @@ import { data } from './clothing-size.json'; * * * @automaticallyGeneratedExamples + * @example + * 'XXS' + * 'XS' + * 'S' */ export function randClothingSize( diff --git a/packages/falso/src/lib/color.ts b/packages/falso/src/lib/color.ts index 58e35f75..aba00d79 100644 --- a/packages/falso/src/lib/color.ts +++ b/packages/falso/src/lib/color.ts @@ -16,6 +16,10 @@ import { data } from './color.json'; * * * @automaticallyGeneratedExamples + * @example + * 'AliceBlue' + * 'AntiqueWhite' + * 'Aqua' */ export function randColor( diff --git a/packages/falso/src/lib/company-name.ts b/packages/falso/src/lib/company-name.ts index 9e35fd2c..e30a8a14 100644 --- a/packages/falso/src/lib/company-name.ts +++ b/packages/falso/src/lib/company-name.ts @@ -16,6 +16,10 @@ import { data } from './company-name.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Kautzer, Macejkovic and Fisher' + * 'Greenholt - Mosciski' + * 'Marquardt - Runolfsdottir' */ export function randCompanyName( diff --git a/packages/falso/src/lib/country-code.ts b/packages/falso/src/lib/country-code.ts index 96e034dd..969cfb68 100644 --- a/packages/falso/src/lib/country-code.ts +++ b/packages/falso/src/lib/country-code.ts @@ -16,6 +16,10 @@ import { data } from './country-code.json'; * * * @automaticallyGeneratedExamples + * @example + * 'MS' + * 'TW' + * 'LR' */ export function randCountryCode( diff --git a/packages/falso/src/lib/country.ts b/packages/falso/src/lib/country.ts index 101a2bed..ee7fe8bd 100644 --- a/packages/falso/src/lib/country.ts +++ b/packages/falso/src/lib/country.ts @@ -16,6 +16,10 @@ import { data } from './country.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Argentina' + * 'Peru' + * 'Colombia' */ export function randCountry( diff --git a/packages/falso/src/lib/county.ts b/packages/falso/src/lib/county.ts index 0fb5e6d4..8c33ac52 100644 --- a/packages/falso/src/lib/county.ts +++ b/packages/falso/src/lib/county.ts @@ -16,6 +16,10 @@ import { data } from './county.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Bedfordshire' + * 'Berkshire' + * 'Bristol' */ export function randCounty( diff --git a/packages/falso/src/lib/cow.ts b/packages/falso/src/lib/cow.ts index f062917c..1053b1f7 100644 --- a/packages/falso/src/lib/cow.ts +++ b/packages/falso/src/lib/cow.ts @@ -16,6 +16,10 @@ import { data } from './cow.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Hartón del Valle' + * 'Pedit' + * 'German Black Pied cattle' */ export function randCow( diff --git a/packages/falso/src/lib/credit-card-brand.ts b/packages/falso/src/lib/credit-card-brand.ts index 49747c05..6df5330f 100644 --- a/packages/falso/src/lib/credit-card-brand.ts +++ b/packages/falso/src/lib/credit-card-brand.ts @@ -16,6 +16,10 @@ import { data } from './credit-card-brand.json'; * * * @automaticallyGeneratedExamples + * @example + * 'American Express' + * 'T-Union' + * 'UnionPay' */ export function randCreditCardBrand( diff --git a/packages/falso/src/lib/credit-card-cvv.ts b/packages/falso/src/lib/credit-card-cvv.ts index a98c5f4d..e12840d0 100644 --- a/packages/falso/src/lib/credit-card-cvv.ts +++ b/packages/falso/src/lib/credit-card-cvv.ts @@ -15,6 +15,10 @@ import { fake, FakeOptions, getRandomInRange } from './core/core'; * * * @automaticallyGeneratedExamples + * @example + * 721 + * 584 + * 106 */ export function randCreditCardCVV( diff --git a/packages/falso/src/lib/credit-card-number.ts b/packages/falso/src/lib/credit-card-number.ts index 07fd1629..64e9870e 100644 --- a/packages/falso/src/lib/credit-card-number.ts +++ b/packages/falso/src/lib/credit-card-number.ts @@ -39,6 +39,32 @@ export type Brand = * * * @automaticallyGeneratedExamples + * @example + * { + brand: 'American Express', + formats: [ '34## ###### #####', '37## ###### #####' ] +} + * { + brand: 'UnionPay', + formats: [ '62## #### #### ####', '62#### #############' ] +} + * { + brand: 'Diners Club', + formats: [ + '300# ###### ####', + '301# ###### ####', + '302# ###### ####', + '303# ###### ####', + '304# ###### ####', + '305# ###### ####', + '309# ###### ####', + '36## ###### ####', + '38## ###### ####', + '39## ###### ####', + '54## #### #### ####', + '55## #### #### ####' + ] +} */ export function randCreditCardNumber< diff --git a/packages/falso/src/lib/crocodilia.ts b/packages/falso/src/lib/crocodilia.ts index f6da9cae..9f998583 100644 --- a/packages/falso/src/lib/crocodilia.ts +++ b/packages/falso/src/lib/crocodilia.ts @@ -16,6 +16,10 @@ import { data } from './crocodilia.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Orinoco Crocodile' + * 'Gharial' + * 'Broad-snouted Caiman' */ export function randCrocodilia( diff --git a/packages/falso/src/lib/currency-code.ts b/packages/falso/src/lib/currency-code.ts index be5393de..0cedf71c 100644 --- a/packages/falso/src/lib/currency-code.ts +++ b/packages/falso/src/lib/currency-code.ts @@ -16,6 +16,10 @@ import { data } from './currency-code.json'; * * * @automaticallyGeneratedExamples + * @example + * 'IRR' + * 'SHP' + * 'NPR' */ export function randCurrencyCode( diff --git a/packages/falso/src/lib/currency-name.ts b/packages/falso/src/lib/currency-name.ts index 7892e879..6a4d0cbc 100644 --- a/packages/falso/src/lib/currency-name.ts +++ b/packages/falso/src/lib/currency-name.ts @@ -16,6 +16,10 @@ import { data } from './currency-name.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Egyptian Pound' + * 'Belize Dollar' + * 'Sudanese Pound' */ export function randCurrencyName( diff --git a/packages/falso/src/lib/currency-symbol.ts b/packages/falso/src/lib/currency-symbol.ts index fa2be334..2dd4d7ac 100644 --- a/packages/falso/src/lib/currency-symbol.ts +++ b/packages/falso/src/lib/currency-symbol.ts @@ -16,6 +16,10 @@ import { data } from './currency-symbol.json'; * * * @automaticallyGeneratedExamples + * @example + * 'B/.' + * '£' + * 'Ls' */ export function randCurrencySymbol( diff --git a/packages/falso/src/lib/database-collation.ts b/packages/falso/src/lib/database-collation.ts index 646f87c3..77ddae30 100644 --- a/packages/falso/src/lib/database-collation.ts +++ b/packages/falso/src/lib/database-collation.ts @@ -16,6 +16,10 @@ import { data } from './database-collation.json'; * * * @automaticallyGeneratedExamples + * @example + * 'utf8_unicode_ci' + * 'cp1250_general_ci' + * 'cp1250_bin' */ export function randDatabaseCollation( diff --git a/packages/falso/src/lib/database-column.ts b/packages/falso/src/lib/database-column.ts index 780e10bd..beb27887 100644 --- a/packages/falso/src/lib/database-column.ts +++ b/packages/falso/src/lib/database-column.ts @@ -16,6 +16,10 @@ import { data } from './database-column.json'; * * * @automaticallyGeneratedExamples + * @example + * 'comment' + * 'group' + * 'password' */ export function randDatabaseColumn( diff --git a/packages/falso/src/lib/database-engine.ts b/packages/falso/src/lib/database-engine.ts index 9023995e..3a19e002 100644 --- a/packages/falso/src/lib/database-engine.ts +++ b/packages/falso/src/lib/database-engine.ts @@ -16,6 +16,10 @@ import { data } from './database-engine.json'; * * * @automaticallyGeneratedExamples + * @example + * 'CSV' + * 'ARCHIVE' + * 'MyISAM' */ export function randDatabaseEngine( diff --git a/packages/falso/src/lib/database-type.ts b/packages/falso/src/lib/database-type.ts index 9efc24ae..bce634f0 100644 --- a/packages/falso/src/lib/database-type.ts +++ b/packages/falso/src/lib/database-type.ts @@ -16,6 +16,10 @@ import { data } from './database-type.json'; * * * @automaticallyGeneratedExamples + * @example + * 'tinyint' + * 'date' + * 'timestamp' */ export function randDatabaseType( diff --git a/packages/falso/src/lib/department.ts b/packages/falso/src/lib/department.ts index 71913636..7dd79bdb 100644 --- a/packages/falso/src/lib/department.ts +++ b/packages/falso/src/lib/department.ts @@ -16,6 +16,10 @@ import { data } from './department.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Games' + * 'Automotive' + * 'Music' */ export function randDepartment( diff --git a/packages/falso/src/lib/direction.ts b/packages/falso/src/lib/direction.ts index caefb27c..143cbb83 100644 --- a/packages/falso/src/lib/direction.ts +++ b/packages/falso/src/lib/direction.ts @@ -16,6 +16,10 @@ import { data } from './direction.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Southwest' + * 'North' + * 'Northeast' */ export function randDirection( diff --git a/packages/falso/src/lib/directory-path.ts b/packages/falso/src/lib/directory-path.ts index 53ac0230..2f69ddfa 100644 --- a/packages/falso/src/lib/directory-path.ts +++ b/packages/falso/src/lib/directory-path.ts @@ -16,6 +16,10 @@ import { data } from './directory-path.json'; * * * @automaticallyGeneratedExamples + * @example + * '/usr/X11R6' + * '/sys' + * '/mnt' */ export function randDirectoryPath( diff --git a/packages/falso/src/lib/dog.ts b/packages/falso/src/lib/dog.ts index 2c7a4e00..52048d84 100644 --- a/packages/falso/src/lib/dog.ts +++ b/packages/falso/src/lib/dog.ts @@ -16,6 +16,10 @@ import { data } from './dog.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Jack Russell Terrier' + * 'Beauceron' + * 'Denmark Feist' */ export function randDog( diff --git a/packages/falso/src/lib/domain-suffix.ts b/packages/falso/src/lib/domain-suffix.ts index a770e343..46ffb7bb 100644 --- a/packages/falso/src/lib/domain-suffix.ts +++ b/packages/falso/src/lib/domain-suffix.ts @@ -16,6 +16,10 @@ import { data } from './domain-suffix.json'; * * * @automaticallyGeneratedExamples + * @example + * 'org' + * 'biz' + * 'com' */ export function randDomainSuffix( diff --git a/packages/falso/src/lib/drinks.ts b/packages/falso/src/lib/drinks.ts index 7aa631a4..3f34a973 100644 --- a/packages/falso/src/lib/drinks.ts +++ b/packages/falso/src/lib/drinks.ts @@ -16,6 +16,10 @@ import { data } from './drinks.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Amaretto Sour' + * 'Aviation' + * 'Cocktail' */ export function randDrinks( diff --git a/packages/falso/src/lib/email-provider.ts b/packages/falso/src/lib/email-provider.ts index 78a0d54a..4b296406 100644 --- a/packages/falso/src/lib/email-provider.ts +++ b/packages/falso/src/lib/email-provider.ts @@ -16,6 +16,10 @@ import { data } from './email-provider.json'; * * * @automaticallyGeneratedExamples + * @example + * 'aim' + * 'alice' + * 'aliceadsl' */ export function randEmailProvider( diff --git a/packages/falso/src/lib/emoji.ts b/packages/falso/src/lib/emoji.ts index 696d0931..bccdf922 100644 --- a/packages/falso/src/lib/emoji.ts +++ b/packages/falso/src/lib/emoji.ts @@ -16,6 +16,10 @@ import { data } from './emoji.json'; * * * @automaticallyGeneratedExamples + * @example + * '😀' + * '😃' + * '😄' */ export function randEmoji( diff --git a/packages/falso/src/lib/ethereum-address.ts b/packages/falso/src/lib/ethereum-address.ts index 06487238..97b1ece5 100644 --- a/packages/falso/src/lib/ethereum-address.ts +++ b/packages/falso/src/lib/ethereum-address.ts @@ -16,6 +16,10 @@ import { data } from './ethereum-address.json'; * * * @automaticallyGeneratedExamples + * @example + * '0x958aa9ddbd62f989dec2fd1468bf436aebeb8be6' + * '0x9a7a3607dc4617deff6d4f9ca5d8c0beba0cffc5' + * '0xf5dcc57cb74623d2b3bfa6be9d96902f4bacb0b4' */ export function randEthereumAddress( diff --git a/packages/falso/src/lib/file-ext.ts b/packages/falso/src/lib/file-ext.ts index e35f6a8b..1e147cbd 100644 --- a/packages/falso/src/lib/file-ext.ts +++ b/packages/falso/src/lib/file-ext.ts @@ -16,6 +16,10 @@ import { data } from './file-ext.json'; * * * @automaticallyGeneratedExamples + * @example + * 'aiff' + * 'deb' + * 'utz' */ export function randFileExt( diff --git a/packages/falso/src/lib/file-name.ts b/packages/falso/src/lib/file-name.ts index b9a22d23..c3af8557 100644 --- a/packages/falso/src/lib/file-name.ts +++ b/packages/falso/src/lib/file-name.ts @@ -16,6 +16,10 @@ import { data } from './file-name.json'; * * * @automaticallyGeneratedExamples + * @example + * 'markets' + * 'solid_backing_strategist' + * 'granite' */ export function randFileName< diff --git a/packages/falso/src/lib/file-path.ts b/packages/falso/src/lib/file-path.ts index 194a46d8..329bce01 100644 --- a/packages/falso/src/lib/file-path.ts +++ b/packages/falso/src/lib/file-path.ts @@ -16,6 +16,10 @@ import { data } from './file-path.json'; * * * @automaticallyGeneratedExamples + * @example + * '/opt/bin/turn_key_bedfordshire_contingency.mts.acu' + * '/lib/niches_account_springs.w3d.gtm' + * '/Applications/plains_fresh_hack.s.onepkg' */ export function randFilePath( diff --git a/packages/falso/src/lib/file-type.ts b/packages/falso/src/lib/file-type.ts index ac479190..a6b906ec 100644 --- a/packages/falso/src/lib/file-type.ts +++ b/packages/falso/src/lib/file-type.ts @@ -16,6 +16,10 @@ import { data } from './file-type.json'; * * * @automaticallyGeneratedExamples + * @example + * 'model' + * 'x-conference' + * 'x-shader' */ export function randFileType( diff --git a/packages/falso/src/lib/fish.ts b/packages/falso/src/lib/fish.ts index 5e91b0e3..009a4de0 100644 --- a/packages/falso/src/lib/fish.ts +++ b/packages/falso/src/lib/fish.ts @@ -16,6 +16,10 @@ import { data } from './fish.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Araucanian herring' + * 'Pacific saury' + * 'Indian oil sardine' */ export function randFish( diff --git a/packages/falso/src/lib/float.ts b/packages/falso/src/lib/float.ts index 283ec011..734de305 100644 --- a/packages/falso/src/lib/float.ts +++ b/packages/falso/src/lib/float.ts @@ -29,6 +29,10 @@ export interface RandomFloatOptions extends RandomInRangeOptions, FakeOptions {} * randFloat({ min: 10, max: 20, fraction: 2 }) // 12.52 * * @automaticallyGeneratedExamples + * @example + * 3364.7 + * 6531.59 + * 842.33 */ export function randFloat( diff --git a/packages/falso/src/lib/font-family.ts b/packages/falso/src/lib/font-family.ts index 85e212de..7ae7c8fd 100644 --- a/packages/falso/src/lib/font-family.ts +++ b/packages/falso/src/lib/font-family.ts @@ -16,6 +16,10 @@ import { data } from './font-family.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Inter' + * 'DM Sans' + * 'Space Mono' */ export function randFontFamily( diff --git a/packages/falso/src/lib/font-size.ts b/packages/falso/src/lib/font-size.ts index 69d83e71..fa5f9383 100644 --- a/packages/falso/src/lib/font-size.ts +++ b/packages/falso/src/lib/font-size.ts @@ -30,6 +30,10 @@ export interface FontSizeOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * 1253px + * 525px + * 1735px */ export function randFontSize( diff --git a/packages/falso/src/lib/football-team.ts b/packages/falso/src/lib/football-team.ts index 57fd577e..d73b6dc3 100644 --- a/packages/falso/src/lib/football-team.ts +++ b/packages/falso/src/lib/football-team.ts @@ -16,6 +16,10 @@ import { data } from './football-team.json'; * * * @automaticallyGeneratedExamples + * @example + * 'AFC Bournemouth' + * 'Alavés' + * 'Arsenal' */ export function randFootballTeam( diff --git a/packages/falso/src/lib/frequency.ts b/packages/falso/src/lib/frequency.ts index 34a539c2..4773c4c1 100644 --- a/packages/falso/src/lib/frequency.ts +++ b/packages/falso/src/lib/frequency.ts @@ -16,6 +16,10 @@ import { data } from './frequency.json'; * * * @automaticallyGeneratedExamples + * @example + * 'always' + * 'constantly' + * 'usually' */ export function randFrequency( diff --git a/packages/falso/src/lib/future-date.ts b/packages/falso/src/lib/future-date.ts index 24d848f2..8c98ff81 100644 --- a/packages/falso/src/lib/future-date.ts +++ b/packages/falso/src/lib/future-date.ts @@ -24,6 +24,10 @@ interface FutureOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * Fri Mar 10 2023 19:14:56 GMT+0100 (Central European Standard Time) + * Sun Jun 04 2023 16:20:23 GMT+0200 (Central European Summer Time) + * Sun Jul 16 2023 23:09:32 GMT+0200 (Central European Summer Time) */ export function randFutureDate( diff --git a/packages/falso/src/lib/gender.ts b/packages/falso/src/lib/gender.ts index e1476f77..6b111660 100644 --- a/packages/falso/src/lib/gender.ts +++ b/packages/falso/src/lib/gender.ts @@ -25,6 +25,10 @@ interface GenderOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * 'Cisgender' + * 'Male to female transgender woman' + * 'Androgyne' */ export function randGender( diff --git a/packages/falso/src/lib/git-branch.ts b/packages/falso/src/lib/git-branch.ts index f7f84397..7cc9cbbb 100644 --- a/packages/falso/src/lib/git-branch.ts +++ b/packages/falso/src/lib/git-branch.ts @@ -16,6 +16,10 @@ import { data } from './git-branch.json'; * * * @automaticallyGeneratedExamples + * @example + * 'protocol-navigate' + * 'array-quantify' + * 'transmitter-override' */ export function randGitBranch( diff --git a/packages/falso/src/lib/git-commit-sha.ts b/packages/falso/src/lib/git-commit-sha.ts index c4457f87..8de02d88 100644 --- a/packages/falso/src/lib/git-commit-sha.ts +++ b/packages/falso/src/lib/git-commit-sha.ts @@ -18,6 +18,10 @@ const commitShaLen = 40; * * * @automaticallyGeneratedExamples + * @example + * 37386eb1efe69896483cc47b67c7b7246477429d + * ead3788c8d5e9599931cc2c6c48428dc72e5674b + * 1584b4433ec1dae2eaf9aeb47888cef4b5be7a94 */ export function randGitCommitSha( diff --git a/packages/falso/src/lib/git-short-sha.ts b/packages/falso/src/lib/git-short-sha.ts index bc3ac649..7f2fae27 100644 --- a/packages/falso/src/lib/git-short-sha.ts +++ b/packages/falso/src/lib/git-short-sha.ts @@ -18,6 +18,10 @@ const commitShortShaLen = 7; * * * @automaticallyGeneratedExamples + * @example + * 136719d + * ad94783 + * 45cc6cf */ export function randGitShortSha( diff --git a/packages/falso/src/lib/hex.ts b/packages/falso/src/lib/hex.ts index 356beed2..cc2d0205 100644 --- a/packages/falso/src/lib/hex.ts +++ b/packages/falso/src/lib/hex.ts @@ -16,6 +16,10 @@ import { random } from './random'; * * * @automaticallyGeneratedExamples + * @example + * #2b1df7 + * #64f33f + * #af3363 */ export function randHex( diff --git a/packages/falso/src/lib/hexa-decimal.ts b/packages/falso/src/lib/hexa-decimal.ts index ba58d376..26ecd162 100644 --- a/packages/falso/src/lib/hexa-decimal.ts +++ b/packages/falso/src/lib/hexa-decimal.ts @@ -20,6 +20,10 @@ function generator() { * * * @automaticallyGeneratedExamples + * @example + * 1 + * 3 + * a */ export function randHexaDecimal( diff --git a/packages/falso/src/lib/horse.ts b/packages/falso/src/lib/horse.ts index 605b37c2..08981516 100644 --- a/packages/falso/src/lib/horse.ts +++ b/packages/falso/src/lib/horse.ts @@ -16,6 +16,10 @@ import { data } from './horse.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Pottok' + * 'Dutch Heavy Draft' + * 'Spanish Barb' */ export function randHorse( diff --git a/packages/falso/src/lib/hsl.ts b/packages/falso/src/lib/hsl.ts index 5fbf7cdd..04da9cc2 100644 --- a/packages/falso/src/lib/hsl.ts +++ b/packages/falso/src/lib/hsl.ts @@ -24,6 +24,10 @@ export interface HSLOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * hsl(149, 83%, 83%) + * hsl(9, 21%, 38%) + * hsl(327, 32%, 54%) */ export function randHsl(options?: Options) { diff --git a/packages/falso/src/lib/http-method.ts b/packages/falso/src/lib/http-method.ts index 10fd798c..8004dabb 100644 --- a/packages/falso/src/lib/http-method.ts +++ b/packages/falso/src/lib/http-method.ts @@ -16,6 +16,10 @@ import { data } from './http-method.json'; * * * @automaticallyGeneratedExamples + * @example + * 'GET' + * 'POST' + * 'PUT' */ export function randHttpMethod( diff --git a/packages/falso/src/lib/ice-hockey-team.ts b/packages/falso/src/lib/ice-hockey-team.ts index 599d6ced..6fd7ae7b 100644 --- a/packages/falso/src/lib/ice-hockey-team.ts +++ b/packages/falso/src/lib/ice-hockey-team.ts @@ -16,6 +16,10 @@ import { data } from './ice-hockey-team.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Anaheim Ducks' + * 'Arizona Coyotes' + * 'Boston Bruins' */ export function randIceHockeyTeam( diff --git a/packages/falso/src/lib/img.ts b/packages/falso/src/lib/img.ts index 1a09830e..2fa8f840 100644 --- a/packages/falso/src/lib/img.ts +++ b/packages/falso/src/lib/img.ts @@ -17,6 +17,10 @@ type Category = 'animals' | 'arch' | 'nature' | 'people' | 'tech'; * * * @automaticallyGeneratedExamples + * @example + * https://placeimg.com/500/500 + * https://placeimg.com/500/500 + * https://placeimg.com/500/500 */ export function randImg< diff --git a/packages/falso/src/lib/integration.ts b/packages/falso/src/lib/integration.ts index eef92a3f..293d13da 100644 --- a/packages/falso/src/lib/integration.ts +++ b/packages/falso/src/lib/integration.ts @@ -16,6 +16,10 @@ import { data } from './integration.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Slack' + * 'GitHub' + * 'Jira' */ export function randIntegration( diff --git a/packages/falso/src/lib/ip.ts b/packages/falso/src/lib/ip.ts index ecc4555d..c2907d46 100644 --- a/packages/falso/src/lib/ip.ts +++ b/packages/falso/src/lib/ip.ts @@ -18,6 +18,10 @@ const ipRange = { min: 0, max: 255 }; * * * @automaticallyGeneratedExamples + * @example + * 158.171.28.216 + * 3.235.104.69 + * 84.117.186.118 */ export function randIp(options?: Options) { diff --git a/packages/falso/src/lib/ipv6.ts b/packages/falso/src/lib/ipv6.ts index a2ec275c..0eb93310 100644 --- a/packages/falso/src/lib/ipv6.ts +++ b/packages/falso/src/lib/ipv6.ts @@ -16,6 +16,10 @@ import { randHexaDecimal } from './hexa-decimal'; * * * @automaticallyGeneratedExamples + * @example + * 621d:c533:5688:73b8:24fe:a5ca:2ba6:6555 + * eb2e:13a3:a403:2dc5:a016:1f14:be4c:7b2a + * 09e4:b9bf:8d18:e6fb:cfdd:34b5:4341:c58d */ export function randIpv6( diff --git a/packages/falso/src/lib/job-area.ts b/packages/falso/src/lib/job-area.ts index 4a4968af..2c3bdb83 100644 --- a/packages/falso/src/lib/job-area.ts +++ b/packages/falso/src/lib/job-area.ts @@ -16,6 +16,10 @@ import { data } from './job-area.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Brand' + * 'Tactics' + * 'Markets' */ export function randJobArea( diff --git a/packages/falso/src/lib/job-descriptor.ts b/packages/falso/src/lib/job-descriptor.ts index 9e3a42b2..e6c203fe 100644 --- a/packages/falso/src/lib/job-descriptor.ts +++ b/packages/falso/src/lib/job-descriptor.ts @@ -16,6 +16,10 @@ import { data } from './job-descriptor.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Senior' + * 'Corporate' + * 'Future' */ export function randJobDescriptor( diff --git a/packages/falso/src/lib/job-title.ts b/packages/falso/src/lib/job-title.ts index 444c34a7..f3c147b2 100644 --- a/packages/falso/src/lib/job-title.ts +++ b/packages/falso/src/lib/job-title.ts @@ -16,6 +16,10 @@ import { data } from './job-title.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Internal Quality Coordinator' + * 'Legacy Marketing Planner' + * 'Investor Configuration Specialist' */ export function randJobTitle( diff --git a/packages/falso/src/lib/job-type.ts b/packages/falso/src/lib/job-type.ts index d9032681..73113941 100644 --- a/packages/falso/src/lib/job-type.ts +++ b/packages/falso/src/lib/job-type.ts @@ -16,6 +16,10 @@ import { data } from './job-type.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Director' + * 'Representative' + * 'Officer' */ export function randJobType( diff --git a/packages/falso/src/lib/language.ts b/packages/falso/src/lib/language.ts index cb4ac049..41996029 100644 --- a/packages/falso/src/lib/language.ts +++ b/packages/falso/src/lib/language.ts @@ -25,6 +25,10 @@ interface LanguageOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * 'Afrikaans' + * 'Amharic' + * 'Arabic' */ export function randLanguage( diff --git a/packages/falso/src/lib/latitude.ts b/packages/falso/src/lib/latitude.ts index fac12929..75b1ae1d 100644 --- a/packages/falso/src/lib/latitude.ts +++ b/packages/falso/src/lib/latitude.ts @@ -15,6 +15,10 @@ import { FakeOptions, fake, getRandomInRange } from './core/core'; * * * @automaticallyGeneratedExamples + * @example + * 30.204 + * 34.253 + * -31.506 */ export function randLatitude( diff --git a/packages/falso/src/lib/lines.ts b/packages/falso/src/lib/lines.ts index 38f38237..80c1a6e5 100644 --- a/packages/falso/src/lib/lines.ts +++ b/packages/falso/src/lib/lines.ts @@ -16,6 +16,10 @@ import { data } from './lines.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Commodi est rerum dolorum quae voluptatem aliquam.' + * 'Minima qui ut nulla eius.\\nA incidunt ipsum tempore porro tempore.\\nFugit quas voluptas ducimus aut.\\nTempore nostrum velit expedita voluptate est.\\nNam iste explicabo tempore impedit voluptas.' + * 'Dolorem sed neque sequi ad nulla.\\nEum tempora ut sit et ducimus.\\nVel a expedita dignissimos.\\nFacilis iste ut.\\nAd saepe doloremque possimus mollitia atque explicabo.' */ export function randLines( diff --git a/packages/falso/src/lib/lion.ts b/packages/falso/src/lib/lion.ts index c4287ab0..592112a0 100644 --- a/packages/falso/src/lib/lion.ts +++ b/packages/falso/src/lib/lion.ts @@ -16,6 +16,10 @@ import { data } from './lion.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Cape lion' + * 'Transvaal lion' + * 'Masai Lion' */ export function randLion( diff --git a/packages/falso/src/lib/locale.ts b/packages/falso/src/lib/locale.ts index e05d695a..bcd5e267 100644 --- a/packages/falso/src/lib/locale.ts +++ b/packages/falso/src/lib/locale.ts @@ -16,6 +16,10 @@ import { data } from './locale.json'; * * * @automaticallyGeneratedExamples + * @example + * 'cz' + * 'ge' + * 'ne' */ export function randLocale( diff --git a/packages/falso/src/lib/longitude.ts b/packages/falso/src/lib/longitude.ts index c8422f9a..627b74d2 100644 --- a/packages/falso/src/lib/longitude.ts +++ b/packages/falso/src/lib/longitude.ts @@ -15,6 +15,10 @@ import { FakeOptions, fake, getRandomInRange } from './core/core'; * * * @automaticallyGeneratedExamples + * @example + * 33.825 + * 166.81 + * -89.624 */ export function randLongitude( diff --git a/packages/falso/src/lib/mac.ts b/packages/falso/src/lib/mac.ts index f36791ac..1f2988b8 100644 --- a/packages/falso/src/lib/mac.ts +++ b/packages/falso/src/lib/mac.ts @@ -16,6 +16,10 @@ import { randHexaDecimal } from './hexa-decimal'; * * * @automaticallyGeneratedExamples + * @example + * 45-89-7f-20-d3-bf + * fc-e6-d6-46-3b-5c + * 96-74-a8-61-9d-52 */ export function randMac( diff --git a/packages/falso/src/lib/mask.ts b/packages/falso/src/lib/mask.ts index a6ac4b42..1e83a331 100644 --- a/packages/falso/src/lib/mask.ts +++ b/packages/falso/src/lib/mask.ts @@ -20,6 +20,10 @@ import { randAlpha } from './alpha'; * * * @automaticallyGeneratedExamples + * @example + * c05a4 + * q52u2 + * p13u3 */ export function randMask< diff --git a/packages/falso/src/lib/mime-type.ts b/packages/falso/src/lib/mime-type.ts index 4516233a..8e6e587f 100644 --- a/packages/falso/src/lib/mime-type.ts +++ b/packages/falso/src/lib/mime-type.ts @@ -16,6 +16,10 @@ import { data } from './mime-type.json'; * * * @automaticallyGeneratedExamples + * @example + * 'application/vnd.lotus-approach' + * 'application/vnd.wv.csp+wbxml' + * 'application/font-tdpfr' */ export function randMimeType( diff --git a/packages/falso/src/lib/month.ts b/packages/falso/src/lib/month.ts index 1a20a877..a2c94d5e 100644 --- a/packages/falso/src/lib/month.ts +++ b/packages/falso/src/lib/month.ts @@ -24,6 +24,10 @@ export interface MonthOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * 'January' + * 'February' + * 'March' */ export function randMonth( diff --git a/packages/falso/src/lib/movie-character.ts b/packages/falso/src/lib/movie-character.ts index a83e522a..021dbb3e 100644 --- a/packages/falso/src/lib/movie-character.ts +++ b/packages/falso/src/lib/movie-character.ts @@ -15,6 +15,10 @@ import { data } from './movie-character.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Darth Vader' + * 'Edna Mode' + * 'Randle McMurphy' */ export function randMovieCharacter( diff --git a/packages/falso/src/lib/movie.ts b/packages/falso/src/lib/movie.ts index ddac722c..c5cd3a0c 100644 --- a/packages/falso/src/lib/movie.ts +++ b/packages/falso/src/lib/movie.ts @@ -15,6 +15,10 @@ import { data } from './movie.json'; * * * @automaticallyGeneratedExamples + * @example + * 'The Shawshank Redemption' + * 'The Godfather' + * 'The Godfather: Part II' */ export function randMovie( diff --git a/packages/falso/src/lib/music-genre.ts b/packages/falso/src/lib/music-genre.ts index ccc036c2..a8d12b45 100644 --- a/packages/falso/src/lib/music-genre.ts +++ b/packages/falso/src/lib/music-genre.ts @@ -16,6 +16,10 @@ import { data } from './music-genre.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Classical' + * 'Reggae' + * 'Blues' */ export function randMusicGenre( diff --git a/packages/falso/src/lib/nearby-gpscoordinate.ts b/packages/falso/src/lib/nearby-gpscoordinate.ts index 894cb48b..87dbac9d 100644 --- a/packages/falso/src/lib/nearby-gpscoordinate.ts +++ b/packages/falso/src/lib/nearby-gpscoordinate.ts @@ -17,6 +17,10 @@ import { randLongitude } from './longitude'; * * * @automaticallyGeneratedExamples + * @example + * -35.38,152.673 + * 32.35,-15.859 + * -32.507,-145.21 */ export function randNearbyGPSCoordinate( diff --git a/packages/falso/src/lib/number.ts b/packages/falso/src/lib/number.ts index 21ef1e54..60f13f6c 100644 --- a/packages/falso/src/lib/number.ts +++ b/packages/falso/src/lib/number.ts @@ -45,6 +45,10 @@ export interface RandomNumberOptions extends RandomInRangeOptions, FakeOptions { * randNumber({ min: 1000, max: 2000, precision: 10 }) // 1_250 * * @automaticallyGeneratedExamples + * @example + * 594711 + * 214173 + * 523061 */ export function randNumber( diff --git a/packages/falso/src/lib/oauth-provider.ts b/packages/falso/src/lib/oauth-provider.ts index fa181792..462a4014 100644 --- a/packages/falso/src/lib/oauth-provider.ts +++ b/packages/falso/src/lib/oauth-provider.ts @@ -16,6 +16,10 @@ import { data } from './oauth-provider.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Amazon' + * 'AOL' + * 'Autodesk' */ export function randOAuthProvider( diff --git a/packages/falso/src/lib/octal.ts b/packages/falso/src/lib/octal.ts index c4f5343f..a5cd0d13 100644 --- a/packages/falso/src/lib/octal.ts +++ b/packages/falso/src/lib/octal.ts @@ -15,6 +15,10 @@ import { fake, FakeOptions } from './core/core'; * * * @automaticallyGeneratedExamples + * @example + * 26575274017412507 + * 223001471652072323 + * 160740577524717427 */ export function randOctal( diff --git a/packages/falso/src/lib/ordinal-direction.ts b/packages/falso/src/lib/ordinal-direction.ts index 3baee2d5..d2871fc9 100644 --- a/packages/falso/src/lib/ordinal-direction.ts +++ b/packages/falso/src/lib/ordinal-direction.ts @@ -16,6 +16,10 @@ import { data } from './ordinal-direction.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Southwest' + * 'Northwest' + * 'Southeast' */ export function randOrdinalDirection( diff --git a/packages/falso/src/lib/paragraph.ts b/packages/falso/src/lib/paragraph.ts index 21134537..1227d5cf 100644 --- a/packages/falso/src/lib/paragraph.ts +++ b/packages/falso/src/lib/paragraph.ts @@ -16,6 +16,10 @@ import { data } from './paragraph.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Quia sit architecto itaque voluptas aliquam. Rem veritatis qui quasi sint velit dolorem maxime voluptatem. Sit aut laboriosam aspernatur dicta non consequatur qui recusandae. Dignissimos voluptatem labore praesentium.' + * 'Eveniet qui aperiam et. Rem incidunt sapiente architecto earum consectetur officia. Assumenda voluptatem sed aperiam sed temporibus sunt in. Totam molestiae aspernatur quia non rem facilis expedita harum veritatis. Culpa ipsam quo dolor.' + * 'Perspiciatis distinctio quia est magni. Aliquid id sed qui quis eum amet ut iusto. Et eos repellat nisi doloremque. Non est aut dolores accusamus pariatur placeat amet dolor.' */ export function randParagraph( diff --git a/packages/falso/src/lib/password.ts b/packages/falso/src/lib/password.ts index e841866f..fa803a07 100644 --- a/packages/falso/src/lib/password.ts +++ b/packages/falso/src/lib/password.ts @@ -24,6 +24,10 @@ export interface PasswordOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * igPbPzb0NCpuQpB + * MD8iRRoiUmpGq6F + * OyYuahySZicMxdg */ export function randPassword( diff --git a/packages/falso/src/lib/past-date.ts b/packages/falso/src/lib/past-date.ts index 39bc01a4..f5bc6578 100644 --- a/packages/falso/src/lib/past-date.ts +++ b/packages/falso/src/lib/past-date.ts @@ -24,6 +24,10 @@ interface PastOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * Sun May 01 2022 04:45:01 GMT+0200 (Central European Summer Time) + * Wed Mar 02 2022 06:23:07 GMT+0100 (Central European Standard Time) + * Mon Dec 27 2021 15:33:39 GMT+0100 (Central European Standard Time) */ export function randPastDate( diff --git a/packages/falso/src/lib/permission.ts b/packages/falso/src/lib/permission.ts index b6666e04..8e8aa061 100644 --- a/packages/falso/src/lib/permission.ts +++ b/packages/falso/src/lib/permission.ts @@ -24,6 +24,10 @@ interface PermissionOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * 'read' + * 'write' + * 'execute' */ export function randPermission( diff --git a/packages/falso/src/lib/person-title.ts b/packages/falso/src/lib/person-title.ts index 506f46cf..00fe97cd 100644 --- a/packages/falso/src/lib/person-title.ts +++ b/packages/falso/src/lib/person-title.ts @@ -16,6 +16,10 @@ import { data } from './person-title.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Dr.' + * 'Miss' + * 'Mr.' */ export function randPersonTitle( diff --git a/packages/falso/src/lib/phone-number.ts b/packages/falso/src/lib/phone-number.ts index 09b22fc3..650b094d 100644 --- a/packages/falso/src/lib/phone-number.ts +++ b/packages/falso/src/lib/phone-number.ts @@ -254,6 +254,13 @@ type CountryCode = * * * @automaticallyGeneratedExamples + * @example + * { formats: [ '+247 ####' ], countryCode: [ 'AC' ] } + * { formats: [ '+376 ### ###' ], countryCode: [ 'AD' ] } + * { + formats: [ '+971 ## ### ####', '+971 # ### ####' ], + countryCode: [ 'AE' ] +} */ export function randPhoneNumber< diff --git a/packages/falso/src/lib/phrase.ts b/packages/falso/src/lib/phrase.ts index d1adecd0..e6e17cb6 100644 --- a/packages/falso/src/lib/phrase.ts +++ b/packages/falso/src/lib/phrase.ts @@ -16,6 +16,10 @@ import { data } from './phrase.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Try to program the GB interface, maybe it will copy the wireless hard drive!' + * 'Try to bypass the GB panel, maybe it will synthesize the back-end transmitter!' + * 'If we program the protocol, we can get to the SDD application through the virtual RAM pixel!' */ export function randPhrase( diff --git a/packages/falso/src/lib/port.ts b/packages/falso/src/lib/port.ts index 8263e1a9..982be6c7 100644 --- a/packages/falso/src/lib/port.ts +++ b/packages/falso/src/lib/port.ts @@ -16,6 +16,10 @@ import { randNumber } from './number'; * * * @automaticallyGeneratedExamples + * @example + * 35336 + * 52484 + * 56847 */ export function randPort( diff --git a/packages/falso/src/lib/priority.ts b/packages/falso/src/lib/priority.ts index 5d2027cf..819493f9 100644 --- a/packages/falso/src/lib/priority.ts +++ b/packages/falso/src/lib/priority.ts @@ -16,6 +16,10 @@ import { data } from './priority.json'; * * * @automaticallyGeneratedExamples + * @example + * 'low' + * 'medium' + * 'high' */ export function randPriority( diff --git a/packages/falso/src/lib/product-adjective.ts b/packages/falso/src/lib/product-adjective.ts index 2db2ae87..c93bcf6f 100644 --- a/packages/falso/src/lib/product-adjective.ts +++ b/packages/falso/src/lib/product-adjective.ts @@ -16,6 +16,10 @@ import { data } from './product-adjective.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Awesome' + * 'Rustic' + * 'Small' */ export function randProductAdjective( diff --git a/packages/falso/src/lib/product-category.ts b/packages/falso/src/lib/product-category.ts index f117be64..581bff5b 100644 --- a/packages/falso/src/lib/product-category.ts +++ b/packages/falso/src/lib/product-category.ts @@ -16,6 +16,10 @@ import { data } from './product-category.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Antiques' + * 'Appliances' + * 'Automotive Parts & Accessories' */ export function randProductCategory( diff --git a/packages/falso/src/lib/product-description.ts b/packages/falso/src/lib/product-description.ts index f5b6e562..7b88bdb0 100644 --- a/packages/falso/src/lib/product-description.ts +++ b/packages/falso/src/lib/product-description.ts @@ -16,6 +16,10 @@ import { data } from './product-description.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Bostons most advanced compression wear technology increases muscle oxygenation, stabilizes active muscles' + * 'The Football Is Good For Training And Recreational Purposes' + * 'New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016' */ export function randProductDescription( diff --git a/packages/falso/src/lib/product-material.ts b/packages/falso/src/lib/product-material.ts index b77b3a1b..6f480630 100644 --- a/packages/falso/src/lib/product-material.ts +++ b/packages/falso/src/lib/product-material.ts @@ -16,6 +16,10 @@ import { data } from './product-material.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Metal' + * 'Plastic' + * 'Rubber' */ export function randProductMaterial( diff --git a/packages/falso/src/lib/product-name.ts b/packages/falso/src/lib/product-name.ts index cdf4efb1..daadcdb4 100644 --- a/packages/falso/src/lib/product-name.ts +++ b/packages/falso/src/lib/product-name.ts @@ -16,6 +16,10 @@ import { data } from './product-name.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Small Rubber Shoes' + * 'Fantastic Wooden Sausages' + * 'Handmade Frozen Salad' */ export function randProductName( diff --git a/packages/falso/src/lib/product.ts b/packages/falso/src/lib/product.ts index b9a38cf8..1c20b4a9 100644 --- a/packages/falso/src/lib/product.ts +++ b/packages/falso/src/lib/product.ts @@ -33,6 +33,10 @@ export interface Product { * * * @automaticallyGeneratedExamples + * @example + * 'Chair' + * 'Soap' + * 'Sausages' */ export function randProduct( diff --git a/packages/falso/src/lib/programming-language.ts b/packages/falso/src/lib/programming-language.ts index a55dd137..447c4cc2 100644 --- a/packages/falso/src/lib/programming-language.ts +++ b/packages/falso/src/lib/programming-language.ts @@ -16,6 +16,10 @@ import { data } from './programming-language.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Python' + * 'Java' + * 'JavaScript' */ export function randProgrammingLanguage( diff --git a/packages/falso/src/lib/pronoun.ts b/packages/falso/src/lib/pronoun.ts index c520d3fe..772caf38 100644 --- a/packages/falso/src/lib/pronoun.ts +++ b/packages/falso/src/lib/pronoun.ts @@ -12,6 +12,10 @@ import { data } from './pronoun.json'; * * * @automaticallyGeneratedExamples + * @example + * 'They/Them' + * 'She/Her' + * 'He/Him' */ export function randPronoun( diff --git a/packages/falso/src/lib/protocol.ts b/packages/falso/src/lib/protocol.ts index a16c3e8c..94ac27a4 100644 --- a/packages/falso/src/lib/protocol.ts +++ b/packages/falso/src/lib/protocol.ts @@ -25,6 +25,10 @@ interface ProtocolOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * 'https' + * 'http' + * 'tcp' */ export function randProtocol( diff --git a/packages/falso/src/lib/quote.ts b/packages/falso/src/lib/quote.ts index dcf6cba1..fa4adf30 100644 --- a/packages/falso/src/lib/quote.ts +++ b/packages/falso/src/lib/quote.ts @@ -16,6 +16,10 @@ import { data } from './quote.json'; * * * @automaticallyGeneratedExamples + * @example + * 'A stumble may prevent a fall.' + * 'Put your future in good hands your own.' + * "What you see depends on what you're looking for." */ export function randQuote( diff --git a/packages/falso/src/lib/rabbit.ts b/packages/falso/src/lib/rabbit.ts index 7782e864..43c32cec 100644 --- a/packages/falso/src/lib/rabbit.ts +++ b/packages/falso/src/lib/rabbit.ts @@ -16,6 +16,10 @@ import { data } from './rabbit.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Satin' + * 'Giant Angora' + * 'Tan' */ export function randRabbit( diff --git a/packages/falso/src/lib/random.ts b/packages/falso/src/lib/random.ts index 4d056eae..7c26b059 100644 --- a/packages/falso/src/lib/random.ts +++ b/packages/falso/src/lib/random.ts @@ -13,25 +13,10 @@ let prng = seedRandom(); * * * @automaticallyGeneratedExamples - */ - -export function random() { - return prng(); -} - -/** - * Sets and Resets random seed. - * - * @category general - * - * @example - * - * seed() - * * @example - * - * seed('some-constant-seed') - * + * 0.14991954812181882 + * 0.8425426058803052 + * 0.07010227748271382 */ export function seed(value?: string) { diff --git a/packages/falso/src/lib/recent-date.ts b/packages/falso/src/lib/recent-date.ts index b624b9ba..5de92b0a 100644 --- a/packages/falso/src/lib/recent-date.ts +++ b/packages/falso/src/lib/recent-date.ts @@ -24,6 +24,10 @@ interface RecentOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * Mon Jul 18 2022 20:10:55 GMT+0200 (Central European Summer Time) + * Mon Jul 18 2022 17:14:10 GMT+0200 (Central European Summer Time) + * Tue Jul 19 2022 00:41:23 GMT+0200 (Central European Summer Time) */ export function randRecentDate( diff --git a/packages/falso/src/lib/rgb.ts b/packages/falso/src/lib/rgb.ts index e79e3817..b51593b8 100644 --- a/packages/falso/src/lib/rgb.ts +++ b/packages/falso/src/lib/rgb.ts @@ -24,6 +24,10 @@ export interface RGBOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * rgb(197, 87, 72) + * rgb(126, 83, 138) + * rgb(166, 45, 239) */ export function randRgb(options?: Options) { diff --git a/packages/falso/src/lib/role.ts b/packages/falso/src/lib/role.ts index 079311fe..d77eddb5 100644 --- a/packages/falso/src/lib/role.ts +++ b/packages/falso/src/lib/role.ts @@ -16,6 +16,10 @@ import { data } from './role.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Admin' + * 'Editor' + * 'Owner' */ export function randRole( diff --git a/packages/falso/src/lib/routing-number.ts b/packages/falso/src/lib/routing-number.ts index 64d493cb..fb69cba9 100644 --- a/packages/falso/src/lib/routing-number.ts +++ b/packages/falso/src/lib/routing-number.ts @@ -16,6 +16,10 @@ import { randNumber } from './number'; * * * @automaticallyGeneratedExamples + * @example + * 84704424 + * 94603877 + * 32247120 */ export function randRoutingNumber( diff --git a/packages/falso/src/lib/seat-number.ts b/packages/falso/src/lib/seat-number.ts index 05598609..db0bee8d 100644 --- a/packages/falso/src/lib/seat-number.ts +++ b/packages/falso/src/lib/seat-number.ts @@ -16,6 +16,10 @@ import { rand } from './rand'; * * * @automaticallyGeneratedExamples + * @example + * 5F + * 18D + * 2F */ export function randSeatNumber( diff --git a/packages/falso/src/lib/semver.ts b/packages/falso/src/lib/semver.ts index d74d6b2d..d6ca1a1b 100644 --- a/packages/falso/src/lib/semver.ts +++ b/packages/falso/src/lib/semver.ts @@ -24,6 +24,10 @@ export interface SemverOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * 3.17.1 + * 19.12.3 + * 5.4.10 */ export function randSemver( diff --git a/packages/falso/src/lib/sentence.ts b/packages/falso/src/lib/sentence.ts index 2d0c998f..7aa1d7cb 100644 --- a/packages/falso/src/lib/sentence.ts +++ b/packages/falso/src/lib/sentence.ts @@ -32,6 +32,10 @@ function getSpecialCharacter(wordCount: number): string { * * * @automaticallyGeneratedExamples + * @example + * 'Vero voluptatem fuga sequi veritatis.' + * 'Temporibus reprehenderit neque sint nihil sint quae.' + * 'Aperiam porro aperiam et.' */ export function randSentence( diff --git a/packages/falso/src/lib/sequence.ts b/packages/falso/src/lib/sequence.ts index 59f015f0..922cb31b 100644 --- a/packages/falso/src/lib/sequence.ts +++ b/packages/falso/src/lib/sequence.ts @@ -53,6 +53,10 @@ type RandomSequenceOptions2 = { * * * @automaticallyGeneratedExamples + * @example + * 95vctFi3 + * AI9cNHN7 + * g2YAKyLq */ export function randSequence( diff --git a/packages/falso/src/lib/shape.ts b/packages/falso/src/lib/shape.ts index 1f021f3a..ff2fdad9 100644 --- a/packages/falso/src/lib/shape.ts +++ b/packages/falso/src/lib/shape.ts @@ -16,6 +16,10 @@ import { data } from './shape.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Triangle' + * 'Circle' + * 'Square' */ export function randShape( diff --git a/packages/falso/src/lib/singer.ts b/packages/falso/src/lib/singer.ts index 719551ff..5bcbce3d 100644 --- a/packages/falso/src/lib/singer.ts +++ b/packages/falso/src/lib/singer.ts @@ -15,6 +15,10 @@ import { data } from './singer.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Mary J. Blige' + * 'Steven Tyler' + * 'Stevie Nicks' */ export function randSinger( diff --git a/packages/falso/src/lib/skill.ts b/packages/falso/src/lib/skill.ts index 9caf3a3f..780a4024 100644 --- a/packages/falso/src/lib/skill.ts +++ b/packages/falso/src/lib/skill.ts @@ -16,6 +16,10 @@ import { data } from './skill.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Accounting or bookkeeping' + * 'Active listening' + * 'Adaptability' */ export function randSkill( diff --git a/packages/falso/src/lib/snake.ts b/packages/falso/src/lib/snake.ts index e4467a0f..f8208931 100644 --- a/packages/falso/src/lib/snake.ts +++ b/packages/falso/src/lib/snake.ts @@ -16,6 +16,10 @@ import { data } from './snake.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Bluntnose viper' + * 'Yunnan keelback' + * 'Eastern hognose snake' */ export function randSnake( diff --git a/packages/falso/src/lib/social.ts b/packages/falso/src/lib/social.ts index 32095b8b..3b197944 100644 --- a/packages/falso/src/lib/social.ts +++ b/packages/falso/src/lib/social.ts @@ -14,7 +14,11 @@ import { data } from './social.json'; * * randSocial({ length: 2 }) * - * + * @automaticallyGeneratedExamples + * @example + * { name: 'Triller', link: 'https://www.triller.co/' } + * { name: 'Periscope', link: 'https://www.periscope.tv/' } + * { name: 'Vimeo', link: 'https://vimeo.com/' } */ export function randSocial( diff --git a/packages/falso/src/lib/song.ts b/packages/falso/src/lib/song.ts index c005ec26..a6ba4e32 100644 --- a/packages/falso/src/lib/song.ts +++ b/packages/falso/src/lib/song.ts @@ -15,6 +15,10 @@ import { data } from './song.json'; * * * @automaticallyGeneratedExamples + * @example + * 'The twist' + * 'Smooth' + * 'Mack the knife' */ export function randSong( diff --git a/packages/falso/src/lib/soon-date.ts b/packages/falso/src/lib/soon-date.ts index 8eb4ab55..5805462a 100644 --- a/packages/falso/src/lib/soon-date.ts +++ b/packages/falso/src/lib/soon-date.ts @@ -24,6 +24,10 @@ interface SoonOptions extends FakeOptions { * * * @automaticallyGeneratedExamples + * @example + * Tue Jul 19 2022 14:16:27 GMT+0200 (Central European Summer Time) + * Tue Jul 19 2022 18:06:09 GMT+0200 (Central European Summer Time) + * Wed Jul 20 2022 04:12:57 GMT+0200 (Central European Summer Time) */ export function randSoonDate( diff --git a/packages/falso/src/lib/state-abbr.ts b/packages/falso/src/lib/state-abbr.ts index 46a67aae..2234c715 100644 --- a/packages/falso/src/lib/state-abbr.ts +++ b/packages/falso/src/lib/state-abbr.ts @@ -16,6 +16,10 @@ import { data } from './state-abbr.json'; * * * @automaticallyGeneratedExamples + * @example + * 'OR' + * 'FL' + * 'NM' */ export function randStateAbbr( diff --git a/packages/falso/src/lib/state.ts b/packages/falso/src/lib/state.ts index 0ca7e8da..a8038e6e 100644 --- a/packages/falso/src/lib/state.ts +++ b/packages/falso/src/lib/state.ts @@ -16,6 +16,10 @@ import { data } from './state.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Oklahoma' + * 'South Dakota' + * 'Massachusetts' */ export function randState( diff --git a/packages/falso/src/lib/status.ts b/packages/falso/src/lib/status.ts index dcf24f61..fb2c041e 100644 --- a/packages/falso/src/lib/status.ts +++ b/packages/falso/src/lib/status.ts @@ -20,6 +20,11 @@ type Type = 'Project' | 'User Story' | 'Task'; * * randStatus({ length: 10 }) * + * @automaticallyGeneratedExamples + * @example + * { status: 'Pending', type: [ 'Project', 'User Story' ] } + * { status: 'Todo', type: [ 'User Story', 'Task' ] } + * { status: 'In progress', type: [ 'Task' ] } */ export function randStatus< diff --git a/packages/falso/src/lib/street-name.ts b/packages/falso/src/lib/street-name.ts index e505dd58..8ed79c12 100644 --- a/packages/falso/src/lib/street-name.ts +++ b/packages/falso/src/lib/street-name.ts @@ -16,6 +16,10 @@ import { data } from './street-name.json'; * * * @automaticallyGeneratedExamples + * @example + * 'King Drives' + * 'Georgiana Throughway' + * 'Antonietta Highway' */ export function randStreetName( diff --git a/packages/falso/src/lib/subscription-plan.ts b/packages/falso/src/lib/subscription-plan.ts index e65c3ddf..f6fc6217 100644 --- a/packages/falso/src/lib/subscription-plan.ts +++ b/packages/falso/src/lib/subscription-plan.ts @@ -16,6 +16,10 @@ import { data } from './subscription-plan.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Basic' + * 'Premium' + * 'Free' */ export function randSubscriptionPlan( diff --git a/packages/falso/src/lib/superhero.ts b/packages/falso/src/lib/superhero.ts index 250b881b..0b6ee904 100644 --- a/packages/falso/src/lib/superhero.ts +++ b/packages/falso/src/lib/superhero.ts @@ -37,6 +37,10 @@ export interface SuperheroEntity extends Superhero { * * * @automaticallyGeneratedExamples + * @example + * { realName: 'Peter Parker', alterEgo: 'Spider-man', company: 'Marvel' } + * { realName: 'Matt Murdock', alterEgo: 'Daredevil', company: 'Marvel' } + * { realName: "T'Challa", alterEgo: 'Black Panther', company: 'Marvel' } */ export function randSuperhero( diff --git a/packages/falso/src/lib/svg.ts b/packages/falso/src/lib/svg.ts index 9ecbd1fd..f750939c 100644 --- a/packages/falso/src/lib/svg.ts +++ b/packages/falso/src/lib/svg.ts @@ -16,6 +16,10 @@ import { data } from './svg.json'; * * * @automaticallyGeneratedExamples + * @example + * '' + * '' + * '' */ export function randSvg( diff --git a/packages/falso/src/lib/time-zone.ts b/packages/falso/src/lib/time-zone.ts index aff2fc94..a6883de2 100644 --- a/packages/falso/src/lib/time-zone.ts +++ b/packages/falso/src/lib/time-zone.ts @@ -16,6 +16,10 @@ import { data } from './time-zone.json'; * * * @automaticallyGeneratedExamples + * @example + * 'America/Lima' + * 'America/Juneau' + * 'Pacific/Auckland' */ export function randTimeZone( diff --git a/packages/falso/src/lib/transaction-type.ts b/packages/falso/src/lib/transaction-type.ts index 35964477..41975b6d 100644 --- a/packages/falso/src/lib/transaction-type.ts +++ b/packages/falso/src/lib/transaction-type.ts @@ -16,6 +16,10 @@ import { data } from './transaction-type.json'; * * * @automaticallyGeneratedExamples + * @example + * 'deposit' + * 'withdrawal' + * 'payment' */ export function randTransactionType( diff --git a/packages/falso/src/lib/user-agent.ts b/packages/falso/src/lib/user-agent.ts index b1cb319b..c5a41b42 100644 --- a/packages/falso/src/lib/user-agent.ts +++ b/packages/falso/src/lib/user-agent.ts @@ -16,6 +16,10 @@ import { data } from './user-agent.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Mozilla/5.0 (Windows; U; Windows NT 6.0) AppleWebKit/538.2.0 (KHTML, like Gecko) Chrome/32.0.862.0 Safari/538.2.0' + * 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 5.2; Trident/4.1; .NET CLR 1.3.78921.4)' + * 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_9_8 rv:3.0; RU) AppleWebKit/537.2.2 (KHTML, like Gecko) Version/7.1.6 Safari/537.2.2' */ export function randUserAgent( diff --git a/packages/falso/src/lib/uuid.ts b/packages/falso/src/lib/uuid.ts index 7e67441d..0f84713c 100644 --- a/packages/falso/src/lib/uuid.ts +++ b/packages/falso/src/lib/uuid.ts @@ -17,6 +17,10 @@ import { randNumber } from './number'; * * * @automaticallyGeneratedExamples + * @example + * 0cef8769-2201-4319-be24-3472f762b746 + * 87901759-ddf8-4d83-b26a-b384c9f44b4b + * e781b478-d381-45ad-b332-cfd57e5d4f60 */ export function randUuid( diff --git a/packages/falso/src/lib/vehicle-fuel.ts b/packages/falso/src/lib/vehicle-fuel.ts index a18727e9..6ffbea68 100644 --- a/packages/falso/src/lib/vehicle-fuel.ts +++ b/packages/falso/src/lib/vehicle-fuel.ts @@ -16,6 +16,10 @@ import { data } from './vehicle-fuel.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Gasoline' + * 'Hybrid' + * 'Electric' */ export function randVehicleFuel( diff --git a/packages/falso/src/lib/vehicle-manufacturer.ts b/packages/falso/src/lib/vehicle-manufacturer.ts index f3f2fc4b..0e4f3b72 100644 --- a/packages/falso/src/lib/vehicle-manufacturer.ts +++ b/packages/falso/src/lib/vehicle-manufacturer.ts @@ -16,6 +16,10 @@ import { data } from './vehicle-manufacturer.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Abarth' + * 'Acura' + * 'Alpine' */ export function randVehicleManufacturer( diff --git a/packages/falso/src/lib/vehicle-model.ts b/packages/falso/src/lib/vehicle-model.ts index 8850d36d..2502a016 100644 --- a/packages/falso/src/lib/vehicle-model.ts +++ b/packages/falso/src/lib/vehicle-model.ts @@ -16,6 +16,10 @@ import { data } from './vehicle-model.json'; * * * @automaticallyGeneratedExamples + * @example + * '296 GTB' + * '4Runner' + * '500' */ export function randVehicleModel( diff --git a/packages/falso/src/lib/vehicle-type.ts b/packages/falso/src/lib/vehicle-type.ts index e375f5cb..5a4537a7 100644 --- a/packages/falso/src/lib/vehicle-type.ts +++ b/packages/falso/src/lib/vehicle-type.ts @@ -16,6 +16,10 @@ import { data } from './vehicle-type.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Sedan' + * 'Crew Cab Pickup' + * 'Minivan' */ export function randVehicleType( diff --git a/packages/falso/src/lib/vehicle.ts b/packages/falso/src/lib/vehicle.ts index aae2751f..1b9c7ced 100644 --- a/packages/falso/src/lib/vehicle.ts +++ b/packages/falso/src/lib/vehicle.ts @@ -16,6 +16,10 @@ import { data } from './vehicle.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Toyota Volt' + * 'Rolls Royce XC90' + * 'Nissan Fiesta' */ export function randVehicle( diff --git a/packages/falso/src/lib/verb.ts b/packages/falso/src/lib/verb.ts index 78ff769b..278d94b3 100644 --- a/packages/falso/src/lib/verb.ts +++ b/packages/falso/src/lib/verb.ts @@ -16,6 +16,10 @@ import { data } from './verb.json'; * * * @automaticallyGeneratedExamples + * @example + * 'bypass' + * 'index' + * 'transmit' */ export function randVerb( diff --git a/packages/falso/src/lib/weekday.ts b/packages/falso/src/lib/weekday.ts index 25fc684c..683e9259 100644 --- a/packages/falso/src/lib/weekday.ts +++ b/packages/falso/src/lib/weekday.ts @@ -16,6 +16,10 @@ import { data } from './weekday.json'; * * * @automaticallyGeneratedExamples + * @example + * 'Monday' + * 'Tuesday' + * 'Wedneday' */ export function randWeekday( diff --git a/packages/falso/src/lib/word.ts b/packages/falso/src/lib/word.ts index 1fef78e5..fdda8caf 100644 --- a/packages/falso/src/lib/word.ts +++ b/packages/falso/src/lib/word.ts @@ -28,6 +28,10 @@ function capitalizeFirstLetter(text: string): string { * * * @automaticallyGeneratedExamples + * @example + * 'est' + * 'voluptatem' + * 'non' */ export function randWord( diff --git a/packages/falso/src/lib/zip-code.ts b/packages/falso/src/lib/zip-code.ts index aac2e316..3334ba61 100644 --- a/packages/falso/src/lib/zip-code.ts +++ b/packages/falso/src/lib/zip-code.ts @@ -17,6 +17,10 @@ import { randBoolean } from './boolean'; * * * @automaticallyGeneratedExamples + * @example + * 29992-1740 + * 39128-5620 + * 50624 */ export function randZipCode( diff --git a/scripts/example-generator.js b/scripts/example-generator.js index d1a27344..64f0dc95 100644 --- a/scripts/example-generator.js +++ b/scripts/example-generator.js @@ -1,4 +1,5 @@ const fs = require('fs'); +const { inspect } = require('util'); const [directoryPath, generateIndicator] = process.argv.slice(2); // https://regex101.com/r/qxpfyX/1 @@ -12,7 +13,8 @@ const ERRORS = { missingJsonDataField: `'json.data' field is missing`, jsonDataFieldValueMustBeArray: "'json.data' field value is not array", jsonDataMustNotBeEmptyArray: "'json.data' field value is empty array", - tsFileDoesNotContainRandFunction: "ts file must contain function which name starts with 'rand'" + tsFileDoesNotContainRandFunction: "ts file must contain function which name starts with 'rand'", + fileReadError: 'fileReadError' }; const functions = { @@ -38,12 +40,18 @@ const functions = { } return [json.data.slice(0,3), null]; }, - getExamplesFromTs: (tsContent) => { - const [,randFunction] = Object.entries(tsContent).find(([key]) => key.startsWith('rand')); - if(randFunction === undefined || typeof randFunction !== 'function') { - return [null, ERRORS.tsFileDoesNotContainRandFunction] + getExamplesFromTs: (tsFilePath) => { + try { + const tsContent = require(tsFilePath); + const [,randFunction] = Object.entries(tsContent).find(([key]) => key.startsWith('rand')); + if(randFunction === undefined || typeof randFunction !== 'function') { + return [null, ERRORS.tsFileDoesNotContainRandFunction] + } + return [Array.from({ length: 3 }, randFunction), null] + } catch(error) { + console.log(error); + return [null, ERRORS.fileReadError]; } - return [Array.from({ length: 3 }, randFunction), null] }, generateExamples: (acc, filename) => { const basePath = `${directoryPath}${filename}` @@ -62,13 +70,13 @@ const functions = { } const jsonFileContent = functions.getFileContent(filePath.json); const [examples, error] = jsonFileContent === null - ? functions.getExamplesFromTs(require(`../${basePath}`)) + ? functions.getExamplesFromTs(`../${basePath}`) : functions.getExamplesFromJson(JSON.parse(jsonFileContent)); if(error !== null) { acc[error].push(filename); return acc; } - const replacement = `${generateIndicator}\n * @example\n${examples.map(example => ` * ${example}\n`).join('')} */` + const replacement = `${generateIndicator}\n * @example\n${examples.map(example => ` * ${inspect(example)}\n`).join('')} */` fs.writeFileSync(`${basePath}.ts`, tsFileContent.replace(regexp, replacement)); return acc; },