Function

Module: @ember/template
import { isHTMLSafe } from '@ember/template';
returns
Boolean
`true` if the string was decorated with `htmlSafe`, `false` otherwise.

Detects if a string was decorated using htmlSafe.

1
2
3
4
5
6
7
import { htmlSafe, isHTMLSafe } from '@ember/template';

var plainString = 'plain string',
    safeString = htmlSafe('<div>someValue</div>');

isHTMLSafe(plainString); // false
isHTMLSafe(safeString);  // true