Nurturing Palpable Magnificence
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    fake-schemapublic

    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
     

    install

    npm i fake-schema

    Downloadsweekly downloads

    30

    version

    2.0.1

    license

    MIT

    homepage

    solarapps.be

    repository

    githubgithub

    last publish

    collaborators

    • avatar
    • avatar
    • avatar
    • avatar