48 * @param {string} text text to filter/format
49 * @return {string} html that represents the filtered text
50 */
51function filterPost(text){52 text = unemojify(text)
53 let result = htmlesc(text).replace(allregex, function (match) {
54 let out = match
78 * @param {string} text text to filter/format
79 * @return {string} html that represents the filtered text
80 */
81function filterReply(text) {82 text = htmlesc(text)
83 text = newlineify(text)
84 text = urlify(text)
30 }
31}
32
33export const setup = function (router, con, server) {34 router.get("/api/getFileIcon/*",async function(req,res){
35 let path = req.path.split("/api/getFileIcon/")[1]
36 if(path.length > 4) {
30 }
31}
32
33export const setup = function (router, con, server) {34 router.get("/api/getFileIcon/*",async function(req,res){
35 let path = req.path.split("/api/getFileIcon/")[1]
36 if(path.length > 4) {
12 return ret;
13}
14
15function extend(key,len) {16 let temp = []
17 let out = []
18
Found variables that are declared but not used anywhere.
Unused variables are most often the result of incomplete refactoring. They can lead to confusing code and minor performance hitches.
NOTE: If you have intentionally left a variable unused, we suggest you to prefix the variable name with a _
to prevent them from being flagged by DeepSource.
// Write-only variables are not considered as used.
var y = 10;
y = 5;
// A variable that modifies only itself isn't considered used.
var z = 0;
z = z + 1;
// Unused argument
(function(x) {
return 5;
})();
// Unused recursive functions also raise this issue.
function fact(n) {
if (n < 2) return 1;
return n * fact(n - 1);
}
// When a function definition destructures an array,
// unused entries from the array also cause warnings.
function getY([x, y]) {
return y;
}
var x = 10;
alert(x);
((arg1) => {
return arg1;
})();
let myFunc;
myFunc = (n) => {
// this is legal
if (n < 0) myFunc();
};
// this is also considered legal
console.log(declaredLater);
var declaredLater;
// Only the second argument from the descructured array is used.
function getY([, y]) {
return y;
}