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

Function loadP5Constructors

src/core/friendly_errors/param_validator.js:32–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 }, {});
31
32 function loadP5Constructors() {
33 // Make a list of all p5 classes to be used for argument validation
34 // This must be done only when everything has loaded otherwise we get
35 // an empty array
36 for (let key of Object.keys(p5)) {
37 // Get a list of all constructors in p5. They are functions whose names
38 // start with a capital letter
39 if (typeof p5[key] === 'function' && key[0] !== key[0].toLowerCase()) {
40 p5Constructors[key] = p5[key];
41 }
42 }
43 }
44
45 // `constantsMap` maps constants to their values, e.g.
46 // {

Callers 1

validateParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected