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

Function generateDocumentationLink

src/core/friendly_errors/param_validator.js:502–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500 // TODO: Check if the link is reachable before appending it to the error
501 // message.
502 const generateDocumentationLink = func => {
503 const { funcName, funcClass } = extractFuncNameAndClass(func);
504 const p5BaseUrl = 'https://p5js.org/reference';
505 const url = `${p5BaseUrl}/${funcClass}/${funcName}`;
506
507 return url;
508 };
509
510 if (currentError.code === 'too_big' || currentError.code === 'too_small') {
511 const documentationLink = generateDocumentationLink(func);

Callers 1

friendlyParamErrorFunction · 0.85

Calls 1

extractFuncNameAndClassFunction · 0.85

Tested by

no test coverage detected