Coder Social home page Coder Social logo

faker's Introduction

Faker

This is my very first attempt at writing something that would generate fake data like firstname, lastname, email, internet domain name... It's far from finished BUT since I'm starting to dig the whole experimenting in the open thing... here we go.

It's heavily inspired by the awesome fzaninotto/Faker, I shamelessly borrowed his firstnames and lastnames for now.

Example

let g = Generator.generator()

for _ in 0..<5 {
  print(g["firstname"])
  print(g["lastname"])
  print(g["email"])
  print(g["domain"])
}
Jordan
Cox
[email protected]
yahoo.com

Joe
Cook
[email protected]
gmail.com

Christian
Lewis
[email protected]
gmail.org

Aiden
Mitchell
[email protected]
supercorp.com

Harvey
Chapman
[email protected]
gmail.org

Issues / Concern / Todo

  • Is the API nice enough? I like the subscript approach but subscript in Swift 2.0 can't throw so...
  • Right now the Email provider depends on the domain, the firstname and the lastname one but it's not obvious and I think there should be some kind of explicit dependency.
  • Generating things other than String, I've heard a group of Generics feeling lonely, 😒ing in a corner.

Feedback / Comments ?

I'm Palleas on twitter (and pretty much everywhere else), you can also open an issue.

🍭

faker's People

Contributors

palleas avatar

Watchers

James Cloos avatar Kalin Tsekov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.