handler = ({
get: (target, name) => {
const text = target.text || '';
switch (name) {
case 'text': return target.text;
case 'characters': return text.replace(/\s/g, '').length;
case 'words': return !text ? 0 : text.split(/\s/).length;
case 'lines': return text.split('\n').length;
default: return null
}
}
})