Files
buuh/packages/html/raw.js
T

12 lines
299 B
JavaScript
Raw Normal View History

// Ported from nanohtml 1.10.0 lib/raw-server.js (MIT)
// Mark a string as pre-encoded so the html tag won't escape it.
export default function raw (tag) {
// eslint-disable-next-line no-new-wrappers
const wrapper = new String(tag)
wrapper.__encoded = true
return wrapper
}
export { raw }