MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / checkUnused

Function checkUnused

ServerEditorWeb/ace/worker-javascript.js:7016–7033  ·  view source on GitHub ↗
(func, key)

Source from the content-addressed store, hash-verified

7014 };
7015
7016 var checkUnused = function (func, key) {
7017 var type = func[key];
7018 var tkn = func["(tokens)"][key];
7019
7020 if (key.charAt(0) === "(")
7021 return;
7022
7023 if (type !== "unused" && type !== "unction" && type !== "const")
7024 return;
7025 if (func["(params)"] && func["(params)"].indexOf(key) !== -1)
7026 return;
7027 if (func["(global)"] && _.has(exported, key))
7028 return;
7029 if (type === "const" && !getprop(func, key, "unused"))
7030 return;
7031
7032 warnUnused(key, tkn, "var");
7033 };
7034 for (i = 0; i < JSHINT.undefs.length; i += 1) {
7035 k = JSHINT.undefs[i].slice(0);
7036

Callers 1

itselfFunction · 0.85

Calls 2

getpropFunction · 0.85
warnUnusedFunction · 0.85

Tested by

no test coverage detected