@storybook/addon-docs
Version:
Document component usage and properties in Markdown
15 lines (14 loc) • 325 B
JavaScript
import { parse } from './acornParser';
import { InspectionType } from './types';
export function inspectValue(value) {
try {
const parsingResult = parse(value);
return Object.assign({}, parsingResult);
} catch (e) {// do nothing.
}
return {
inferredType: {
type: InspectionType.UNKNOWN
}
};
}