@dark-engine/platform-server
Version:
Dark renderer for server
25 lines (24 loc) • 495 B
JavaScript
import { illegal as $illegal } from '@dark-engine/core';
import { LIB } from '../constants';
const illegal = x => $illegal(x, LIB);
const escape = x =>
x
.split('')
.map(x => escapeChar(x))
.join('');
function escapeChar(x) {
switch (x) {
case '&':
return '&';
case '<':
return '<';
case '>':
return '>';
case '"':
return '"';
default:
return x;
}
}
export { illegal, escape };
//# sourceMappingURL=utils.js.map