0.3.3 • Published 17 days ago

@zetiko8/slo-id v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

@zetiko8/slo-id

Generate fake slovenian people for testing.

Getting started

npm i @zetiko8/slo-id
import { getMockPerson } from '@zetiko8/slo-id';

describe('test', () => {
    it('produces a person', () => {
        const person = getMockPerson();

        console.log(person);
        /**
         * {
         *    birthDate: { dateString: '10.01.1935', age: 89, date: 1935-01-10T15:06:07.009Z },
         *    email: 'leopoldina.bevc@gmail.com',
         *    name: { surname: 'Bevc', firstName: 'Leopoldina' },
         *    gender: 'F',
         *    mobileNumber: '031627478',
         *    address: { street: 'Bilje 12', zipCode: '2000', city: 'Maribor' },
         *    vatId: '57495998',
         *    iban: 'SI48847443223722412'
         *    }
         */
    });
})

Api reference

import { getMockPerson } from '@zetiko8/slo-id';

const person = getMockPerson({
    // optional options object
    // see types for reference
    {
        birthDate: { minAge: 18 },
        gender: 'M',
        email: 'test@email.com',
        mobileNumber: { withCountryCode: true },
    },
});
0.3.3

17 days ago

0.3.2

3 months ago

0.3.1

3 months ago

0.3.0

3 months ago

0.2.0

3 months ago