faker-datastore
thin wrapper of faker module to simulate a datastore with consistent results
To use it:
const FakeDataStore = require('faker-datastore');
const ds = new FakeDataStore(100);
ds.getSize();
ds.get(-1);
ds.get(100);
ds.get(13);
The datastore hosts Person objects according to the following types:
class Address {
constructor(usState, city, streetName, streetAddress) {
this.usState = usState;
this.city = city;
this.streetName = streetName;
this.streetAddress = streetAddress;
}
}
class Person {
constructor(fname, lname, email, dateOfBirth, address) {
this.fname = fname;
this.lname = lname;
this.email = email;
this.dateOfBirth = dateOfBirth;
this.address = address;
}
}
Tests
// not yet implemented
Contributing
Release History
- 0.1.0 Initial release
- 0.1.1 fixed sizing bug
- 2.0.0 dateOfBirth is now an actual Date object