/faker

Faker is pure Haskell library for generating fake data.

Primary LanguageHaskellMIT LicenseMIT

Faker

Build Status Hackage

Faker is pure Haskell library for generating fake data.

  “It comes in very handy for taking screenshots (taking screenshots for my project,
  Catch the Best was the original impetus for the creation of this gem),
  having real-looking test data, and having your database populated with more
  than one or two records while you're doing development.”

                                              @stympy, creator of faker gem for Ruby

Inspired by:

Install

cabal install faker

Usage

:m Faker.Name

runFaker name -- => John Werbowsky

Modules/Functions

  • Address
    • buildingNumber
    • city
    • cityPrefix
    • citySuffix
    • country
    • latitude
    • longitude
    • postcode
    • secondaryAddress
    • state
    • stateAbbr
    • streetAddress
    • streetName
    • streetSuffix
    • timeZone
  • Name
    • firstName
    • lastName
    • name
    • prefix
    • suffix
    • title
  • Company
    • name
    • buzzwords
    • bs
    • suffix
    • catchPhrase
    • ein
    • dunsNumber
    • logo
  • App
    • name
    • version
    • author
  • Business
    • creditCardNumber
    • creditCardExpiryDate - TODO: should return date
    • creditCardType
  • CreditCard
    • visa
    • mastercard
    • discover
    • discover
    • americanExpress
    • dinersClub
    • jcb
    • switch
    • solo
    • dankort
    • maestro
    • forbrugsforeningen
    • laser
  • Internet
    • email
    • safeEmail
    • freeEmail
    • generateEmail userName
    • userName
    • domainSuffix
    • freeEmailDomain
  • Hacker
    • saySomethingSmart
    • abbreviation
    • adjective
    • noun
    • verb
    • ingverb
    • phrases
  • Lorem
    • characters range -- (15,255)
    • characters num
    • paragraph range -- (2,5)
    • paragraph num
    • paragraphs range -- (2,5)
    • paragraphs num
    • sentence range -- (4,10)
    • sentence num mark
    • sentences range -- (2,5)
    • sentences num
    • word
    • sentences range -- (3,6)
    • sentences num
  • Avatar
    • imageUrl
    • imageUrl slug
    • imageUrl width height
    • imageUrl slug width height
  • Code
    • isbn
    • isbn10
    • isbn13
    • issn
  • ...

Thanks

@igas for idea and explanation

TODO

  • Add rest modules and functions
  • Improve performance
  • Add haddoc documentation
  • Use it with quickcheck
  • Add translations

Tools

Faker designed as lightweight library, because of it it can be easily used with other tools.

License

MIT License.