MCPcopy Index your code
hub / github.com/processing/p5.js / extractFuncNameAndClass

Function extractFuncNameAndClass

src/core/friendly_errors/param_validator.js:100–105  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

98 const ordinals = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth'];
99
100 function extractFuncNameAndClass(func) {
101 const ichDot = func.lastIndexOf('.');
102 const funcName = func.slice(ichDot + 1);
103 const funcClass = func.slice(0, ichDot !== -1 ? ichDot : 0) || 'p5';
104 return { funcName, funcClass };
105 }
106
107 function validBracketNesting(type) {
108 let level = 0;

Callers 2

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected