📄 format-basic.js
/home/palash/git/site/node_modules/stringify-entities/lib/util/format-basic.js
Language: js • Lines: 9
/**
 * The smallest way to encode a character.
 *
 * @param {number} code
 * @returns {string}
 */
export function formatBasic(code) {
  return '&#x' + code.toString(16).toUpperCase() + ';'
}