MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / getSymbols

Function getSymbols

libraries/p5.js:13236–13261  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

13234 var uniqueNamesFound = {};
13235
13236 var getSymbols = function(obj) {
13237 return Object.getOwnPropertyNames(obj).filter(function(name) {
13238 if (name[0] === '_') {
13239 return false;
13240 }
13241 if (name in uniqueNamesFound) {
13242 return false;
13243 }
13244
13245 uniqueNamesFound[name] = true;
13246
13247 return true;
13248 }).map(function(name) {
13249 var type;
13250
13251 if (typeof(obj[name]) === 'function') {
13252 type = 'function';
13253 } else if (name === name.toUpperCase()) {
13254 type = 'constant';
13255 } else {
13256 type = 'variable';
13257 }
13258
13259 return {name: name, type: type};
13260 });
13261 };
13262
13263 misusedAtTopLevelCode = [].concat(
13264 getSymbols(p5.prototype),

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected