2.0.1 • Published 8 years ago

fake-schema v2.0.1

Weekly downloads
27
License
MIT
Repository
github
Last release
8 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

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago