Function: getExamplesFromCommand()
getExamplesFromCommand(
directory): (id,version?) =>Promise<object[]>
Defined in: commands.ts:352
Get all examples from a command.
Parameters​
| Parameter | Type |
|---|---|
directory | string |
Returns​
Function
Parameters​
| Parameter | Type |
|---|---|
id | string |
version? | string |
Returns​
Promise<object[]>
Example​
import utils from '@eventcatalog/utils';
const { getExamplesFromCommand } = utils('/path/to/eventcatalog');
const examples = await getExamplesFromCommand('UpdateInventory');
const examples = await getExamplesFromCommand('UpdateInventory', '0.0.1');