Get rid of ifHasItemOfType
This commit is contained in:
parent
b3ac3cde84
commit
315261bf4f
5 changed files with 42 additions and 69 deletions
|
@ -1,6 +1,10 @@
|
|||
export default { htmlToPlainText };
|
||||
export default { htmlToPlainText, isEmpty };
|
||||
|
||||
function htmlToPlainText(input: string | null | undefined): string | null | undefined {
|
||||
if (!input) return;
|
||||
return $(input).text();
|
||||
}
|
||||
|
||||
function isEmpty(input: Array<unknown> | null | undefined): boolean {
|
||||
return (input?.length ?? 0) === 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue