Giter VIP home page Giter VIP logo

zefaker's People

Contributors

zikani03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zefaker's Issues

Export to a CSV file

zefaker should be able to export to a CSV file. Users must be able to specify the delimiter they want the output CSV to use/have.

Export to JSON file

zefaker should be able to export to a JSON file that contains an array of all the generated rows.

Script doesn't work when column is named `name`

The script below results in an exception because of the name token in the script;

import java.time.LocalDate;

name        = column(index= 0, name="name")
quantity    = column(index= 1, name="quantity")
created_at  = column(index= 2, name="created_at")
category    = column(index= 3, name="category")
deleted     = column(index= 4, name="deleted")
description = column(index= 5, name="description")
modified_at = column(index= 6, name="modified_at")

columns = [
    (name):         { ctx -> ctx.name().firstName() },
    (quantity):     { ctx -> ctx.number().numberBetween(1, 70) },
    (created_at):   { ctx -> LocalDate.now() },
    (category):     { ctx -> ctx.number().numberBetween(0, 5) },
    (deleted):      { ctx -> false },
    (description):  { ctx -> ctx.name().firstName() },
    (modified_at):  { ctx -> LocalDate.now() }
]

generateFrom columns

As reported by @SharkFourSix

Support String keys for specifying columns

Users should be able to write this

generateFrom([
  "firstName": -> { faker -> faker.name().firstName() }
])

Which is more concise than:

generateFrom([
  (column(index=0, name="firstName")): -> { faker -> faker.name().firstName() }
])

Look into using DataFaker library

DataFaker is a fork of Java-Faker that has some additional fixes and according to this tweet fixes some CVEs.

Coordinates:

// https://mvnrepository.com/artifact/net.datafaker/datafaker
implementation group: 'net.datafaker', name: 'datafaker', version: '1.1.0'

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.