return rootPath
}
-// Thanks: https://stackoverflow.com/a/12034334
-function escapeHTML (stringParam) {
- if (!stringParam) return ''
-
- const entityMap = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- '\'': ''',
- '/': '/',
- '`': '`',
- '=': '='
- }
-
- return String(stringParam).replace(/[&<>"'`=/]/g, s => entityMap[s])
-}
-
function pageToStartAndCount (page: number, itemsPerPage: number) {
const start = (page - 1) * itemsPerPage
objectConverter,
root,
- escapeHTML,
pageToStartAndCount,
sanitizeUrl,
sanitizeHost,