# simple-faker-generator

> CLI for faker.js (uses yaml files as format description)

Latest version **1.0.0** (published 2018-09-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-faker-generator
pnpm add simple-faker-generator
yarn add simple-faker-generator
bun add simple-faker-generator
```

Provides the command `gen4fak`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-09-01 |
| First published | 2018-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 18 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Denis Akulov |
| Maintainers | dakulov |

## Links

- npm: https://www.npmjs.com/package/simple-faker-generator
- npm.io page: https://npm.io/package/simple-faker-generator

## Dependencies (5)

- [meow](https://npm.io/package/meow.md) ^5.0.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.12.0
- [fixture-factory](https://npm.io/package/fixture-factory.md) ^1.5.1
- [stringify-object](https://npm.io/package/stringify-object.md) ^3.2.2

## Recent versions

- 1.0.0 (latest) — 2018-09-01

## README

Simple Faker Generator
--
CLI for [faker.js](https://github.com/marak/Faker.js) (uses yaml files as format description)

# Format example
```
id: random.number
login: internet.userName
password: internet.password
firstName: name.firstName
lastName: name.lastName
roles:
  - id: random.number
    name:
      method: random.arrayElement
      args:
        - [admin, guest, user]
age:
  method: random.number
  args:
    - min: 18
      max: 90
createdAt: date.past
number:
  method: helpers.replaceSymbolWithNumber
  args: ['###-####']
secretWords:
  method: helpers.shuffle
  args:
    - [apple, bat, cat]
``` 

see more available formats [faker.js wiki](https://github.com/Marak/faker.js/wiki/Address)


# Usage
```
  CLI for faker.js (uses yaml files as format description)

  Usage
    $ gen4fak --yaml examples/user.yaml --count 1

  Options
    --yaml, -y Path to the file describing the format of objects to be generated
    --count, -c Count of objects to be generated

  Examples
    $ gen4fak --yaml examples/user.yaml --count 1
    [
      {
        id: 28867,
        login: "Simeon.Wilkinson",
        password: "k8taFjMd4EILVZ3",
        firstName: "Rosetta",
        lastName: "Grady",
        roles: {
          id: 39796,
          name: "user"
        },
        age: 64,
        createdAt: new Date('2018-08-08T21:17:43.381Z'),
        number: "973-0044",
        secretWords: [
          "apple",
          "bat",
          "cat"
        ]
      }
    ]
```

# Used packages

- [faker.js](https://github.com/marak/Faker.js)
- [fixture-factory](https://github.com/peterKaleta/fixture-factory)
- [js-yaml](https://github.com/nodeca/js-yaml)
- [stringify-object](https://github.com/yeoman/stringify-object)
- [meow](https://github.com/sindresorhus/meow)
- [chalk](https://github.com/chalk/chalk)

# License

MIT

---
_Source: https://npm.io/package/simple-faker-generator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
