Decode Entities¶
Converts a string containing HTML entities to a plain string with ANSII characters. Also, can be used to strip HTML characters from a string.
Parameters¶
string - str¶
A string to convert to plain text.
Return Value¶
The sanitized string.
Example Usage¶
import decodeEntities from '@mvps-genesis/decode-entities';
const plain = decodeEntities( '<div>Soon™</div>' );
console.log( plain );
// Soon™