mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
21
.internal/escapeHtmlChar.js
Normal file
21
.internal/escapeHtmlChar.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import basePropertyOf from './.internal/basePropertyOf.js';
|
||||
|
||||
/** Used to map characters to HTML entities. */
|
||||
const htmlEscapes = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by `escape` to convert characters to HTML entities.
|
||||
*
|
||||
* @private
|
||||
* @param {string} chr The matched character to escape.
|
||||
* @returns {string} Returns the escaped character.
|
||||
*/
|
||||
const escapeHtmlChar = basePropertyOf(htmlEscapes);
|
||||
|
||||
export default escapeHtmlChar;
|
||||
Reference in New Issue
Block a user