kopia lustrzana https://github.com/badgen/badgen
12 wiersze
226 B
JavaScript
12 wiersze
226 B
JavaScript
![]() |
|
||
|
const sanitize = str => str.replace(/\u0026/g, '&').replace(/\u003C/g, '<')
|
||
|
|
||
|
const typeAssert = (assertion, message) => {
|
||
|
if (!assertion) throw new TypeError(message)
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
sanitize,
|
||
|
typeAssert
|
||
|
}
|