# fake-schema

> Simpl Schema + fake data generators

Latest version **2.0.1** (published 2017-05-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install fake-schema
pnpm add fake-schema
yarn add fake-schema
bun add fake-schema
```

## 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 | 2.0.1 |
| Published | 2017-05-16 |
| First published | 2017-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | jenssolar, rvancauter, sewdn, zuurkern |
| Keywords | json, jsonschema, fake, mocks |

## Links

- npm: https://www.npmjs.com/package/fake-schema
- Repository: https://github.com/jensvrai/fake-schema
- Homepage: http://solarapps.be
- Issues: https://github.com/jensvrai/fake-schema/issues
- npm.io page: https://npm.io/package/fake-schema

## Dependencies (7)

- [faker](https://npm.io/package/faker.md) ^3.1.0
- [chance](https://npm.io/package/chance.md) ^1.0.4
- [randexp](https://npm.io/package/randexp.md) ^0.4.3
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.18.0
- [simpl-schema](https://npm.io/package/simpl-schema.md) ^0.2.3
- [meteor-random](https://npm.io/package/meteor-random.md) ^0.0.3
- [babel-preset-node6](https://npm.io/package/babel-preset-node6.md) ^11.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.1 (latest) — 2017-05-16
- 2.0.0 — 2017-02-21
- 1.1.0 — 2017-02-21
- 1.0.3 — 2017-02-21
- 1.0.2 — 2017-02-21
- 1.0.1 — 2017-02-21
- 1.0.0 — 2017-02-21
- 0.0.8 — 2017-02-01
- 0.0.7 — 2017-02-01
- 0.0.6 — 2017-01-18
- 0.0.5 — 2017-01-18
- 0.0.4 — 2017-01-18
- 0.0.3 — 2017-01-18
- 0.0.2 — 2017-01-18
- 0.0.1 — 2017-01-18

## README

Generate Fake data with faker.js and simpl-schema


## Quick Start

### simpleSchemaDoc(schema (, overrideDoc, params, fakers))

```js
import SimpleSchema from 'simpl-schema';
import Fake from 'fake-schema';

const CompanySchema = new SimpleSchema({
    name: { 
        type: String,
        label: 'Name'
    },
    bankAccount: {
        type: String,
        label: 'Bank Account',
        optional: true
    }
});

const company = Fake.simpleSchemaDoc(CompanySchema);
```


### simpleSchemaDoc(schema, overrideDoc, params, fakers)

```js
import SimpleSchema from 'simpl-schema';
import Fake from 'fake-schema';
import faker from 'faker';

var fakers = {
    name: {}
}

fakers.name = faker.company.companyName;

const CompanySchema = new SimpleSchema({
    name: { 
        type: String,
        label: 'Name'
    },
    bankAccount: {
        type: String,
        label: 'Bank Account',
        optional: true
    }
});

const company = Fake.simpleSchemaDoc(CompanySchema, {}, {}, fakers);
```

### simpleSchemaDocGenerator(schema (, overrideDoc, params, fakers ))

```js
import SimpleSchema from 'simpl-schema';
import Fake from 'fake-schema';

const CompanySchema = new SimpleSchema({
    name: { 
        type: String,
        label: 'Name'
    },
    bankAccount: {
        type: String,
        label: 'Bank Account',
        optional: true
    }
});

const companyGenerator = Fake.simpleSchemaDocGenerator(CompanySchema);

companyGenerator.next().value
companyGenerator.next().value
companyGenerator.next().value

```

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