Function: getDomain()
getDomain(
directory): (id,version?) =>Promise<Domain>
Defined in: domains.ts:36
Returns a domain from EventCatalog.
You can optionally specify a version to get a specific version of the domain
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
version? | string |
Returns
Promise<Domain>
Example
import utils from '@eventcatalog/utils';
const { getDomain } = utils('/path/to/eventcatalog');
// Gets the latest version of the domain
const domain = await getDomain('Payment');
// Gets a version of the domain
const domain = await getDomain('Payment', '0.0.1');