datasquirel/package-shared/functions/backend/db/pathTraversalCheck.js
Benjamin Toby 586e3cfa85 Updates
2024-12-09 12:45:39 +01:00

15 lines
270 B
JavaScript

// @ts-check
/**
* # Path Traversal Check
*
* @param {string|number} text - Text or number or object
*
* @returns {string}
*/
function pathTraversalCheck(text) {
return text.toString().replace(/\//g, "");
}
module.exports = pathTraversalCheck;