Function: commandHasVersion()
commandHasVersion(
directory): (id,version?) =>Promise<boolean>
Defined in: commands.ts:311
Check to see if the catalog has a version for the given command.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
version? | string |
Returns
Promise<boolean>
Example
import utils from '@eventcatalog/utils';
const { commandHasVersion } = utils('/path/to/eventcatalog');
// returns true if version is found for the given event and version (supports semver)
await commandHasVersion('InventoryAdjusted', '0.0.1');
await commandHasVersion('InventoryAdjusted', 'latest');
await commandHasVersion('InventoryAdjusted', '0.0.x');*