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

Function parseOpts

src/type/p5.Font.js:1118–1129  ·  view source on GitHub ↗
(options, defaults)

Source from the content-addressed store, hash-verified

1116function pathToPoints(cmds, options, font) {
1117
1118 const parseOpts = (options, defaults) => {
1119 if (typeof options !== 'object') {
1120 options = defaults;
1121 } else {
1122 for (const key in defaults) {
1123 if (typeof options[key] === 'undefined') {
1124 options[key] = defaults[key];
1125 }
1126 }
1127 }
1128 return options;
1129 };
1130
1131 const at = (v, i) => {
1132 const s = v.length;

Callers 1

pathToPointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected