/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/rich-text/src/is-empty.js
13 строк
359 B
Ella
RichText: replace deprecated multiline prop with simple multiple instances (#54310)
11 сен 2023, 16:10
Не верифицирован
11 сен 2023, 16:10
fee1467
Код
Авторство
О чём код?
/** @typedef {import('./types').RichTextValue} RichTextValue */ /** * Check if a Rich Text value is Empty, meaning it contains no text or any * objects (such as images). * * @param {RichTextValue} value Value to use. * * @return {boolean} True if the value is empty, false if not. */ export function isEmpty( { text } ) { return text.length === 0; }