2.0.1 • Published 7 years ago

fake-schema v2.0.1

Weekly downloads
27
License
MIT
Repository
github
Last release
7 years ago

Generate Fake data with faker.js and simpl-schema

Quick Start

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

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)

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 ))

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
2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago