All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
10 lines
313 B
JavaScript
10 lines
313 B
JavaScript
module.exports = toDecimalReference
|
|
|
|
var fromCharCode = require('../constant/from-char-code')
|
|
|
|
// Transform `code` into a decimal character reference.
|
|
function toDecimalReference(code, next, omit) {
|
|
var value = '&#' + String(code)
|
|
return omit && next && !/\d/.test(fromCharCode(next)) ? value : value + ';'
|
|
}
|