Files
site/node_modules/stringify-entities/lib/util/format-basic.js
T
site-admin 3ac81d5a52
deploy / build-and-publish (push) Successful in 1m37s
the editable site (validation-lab)
2026-11-21 08:03:55 +01:00

12 lines
237 B
JavaScript

/**
* The smallest way to encode a character.
*
* @param {number} code
* Code point.
* @returns {string}
* Hexadecimal reference.
*/
export function formatBasic(code) {
return '&#x' + code.toString(16).toUpperCase() + ';'
}