UNPKG

@storybook/addon-docs

Version:

Document component usage and properties in Markdown

11 lines (9 loc) 198 B
export const str = obj => { if (!obj) { return ''; } if (typeof obj === 'string') { return obj; } throw new Error(`Description: expected string, got: ${JSON.stringify(obj)}`); };