unescape()
Decodes HTML entities in a string. This is the opposite of escape
.
Usage
import { unescape } from 'string-factory';
unescape(string);
Prop types
prop | type | required | default |
---|---|---|---|
string | String | yes | null |
Examples
unescape("<script>alert('hello')</script>") // "<script>alert('hello')</script>"