Improve code quality and write tests

This commit is contained in:
Shivam Mathur
2019-09-20 21:54:46 +05:30
parent db44db4b97
commit 43178a7254
3597 changed files with 255478 additions and 785554 deletions
+21
View File
@@ -0,0 +1,21 @@
var basePropertyOf = require('./_basePropertyOf');
/** Used to map HTML entities to characters. */
var htmlUnescapes = {
'&': '&',
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#39;': "'"
};
/**
* Used by `_.unescape` to convert HTML entities to characters.
*
* @private
* @param {string} chr The matched character to unescape.
* @returns {string} Returns the unescaped character.
*/
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
module.exports = unescapeHtmlChar;