What is lodash.unescape?
The lodash.unescape package is a utility for converting HTML entities in a string back to their corresponding characters. It is part of the Lodash library, which is a popular utility library for JavaScript.
Unescape HTML entities
This feature allows you to convert HTML entities like <, >, and & back to their corresponding characters (<, >, and &). This is useful when you need to display HTML content that has been escaped for security reasons.
const unescape = require('lodash.unescape');
const escapedString = '<div>Hello & welcome!</div>';
const unescapedString = unescape(escapedString);
console.log(unescapedString); // Output: <div>Hello & welcome!</div>