You can optionally specify if you want to get the latest version of the events.
@example
import utils from'@eventcatalog/utils'; const{ getEvents }=utils('/path/to/eventcatalog'); // Gets all events (and versions) from the catalog const events =awaitgetEvents(); // Gets all events (only latest version) from the catalog const events =awaitgetEvents({ latestOnly:true}); // Get all events with the schema attached const events =awaitgetEvents({ attachSchema:true});
Returns all events from EventCatalog.
You can optionally specify if you want to get the latest version of the events.