Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function asText(maybeContent: ?HTMLString): ?string {
return maybeContent && RichText.asText(maybeContent).trim();
}
export function asText(maybeContent: any) {
if (!Array.isArray(maybeContent)) return '';
return maybeContent && RichText.asText(maybeContent).trim();
}
export function prismicAsText(content) {
return RichText.asText(content).trim();
}