MCPcopy Create free account
hub / github.com/mapbox/pbf / buildDefaults

Function buildDefaults

compile.js:289–296  ·  view source on GitHub ↗
(ctx, syntax)

Source from the content-addressed store, hash-verified

287}
288
289function buildDefaults(ctx, syntax) {
290 for (const child of ctx._children) buildDefaults(child, syntax);
291 for (const field of ctx._proto.fields ?? []) {
292 setPackedOption(ctx, field, syntax);
293 setDefaultValue(ctx, field, syntax);
294 }
295 return ctx;
296}
297
298function getDefaultWriteTest(ctx, field) {
299 const def = ctx._defaults[field.name];

Callers 1

compileRawFunction · 0.85

Calls 2

setPackedOptionFunction · 0.85
setDefaultValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…