Skip to content
Faker is pure Haskell library for generating fake data.
Haskell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
src/Faker
test
.gitignore
.stylish-haskell.yaml
.travis.yml
CHANGELOG.md
LICENSE
README.md
Setup.lhs
faker.cabal
package.yaml
stack.yaml

README.md

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.

You can’t perform that action at this time.