Skip to main content
New project sponsor 🪝Hookdeck: Serverless infrastructure for event-driven architecture. Learn more.

domainHasVersion

Callable

  • domainHasVersion(directory: string): (id: string, version: string) => Promise<boolean>

  • Check to see if the catalog has a version for the given domain.

    @example
    import utils from '@eventcatalog/utils';

    const { domainHasVersion } = utils('/path/to/eventcatalog');

    // returns true if version is found for the given event and version (supports semver)
    await domainHasVersion('Orders', '0.0.1');
    await domainHasVersion('Orders', 'latest');
    await domainHasVersion('Orders', '0.0.x');*