JS Seeder
This package provides you a simple interface and a class, useful to create dummy data starting from a TypeScript interface or a JS object
This package depends on Faker.js
I would recommend using TypeScript to benefit of all of his type checking, as there are a few generic types over here
The Seeder Class
The Seeder class provides a single static method,
which is .run
, providing three different parameters (first is mandatory, others are optional)
The ISeed Interface
The ISeed generic interface is very basic, providing a single method called .item
, whose declaration shows up like this
Creating a new seeder
To extend the Seeder's functionality the process is pretty simple,
just create a class which implements the ISeed
interface.
For example
;;