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

Function getMethod

compile.js:141–146  ·  view source on GitHub ↗
(ctx, field)

Source from the content-addressed store, hash-verified

139};
140
141function getMethod(ctx, field) {
142 if (isEnum(getType(ctx, field))) return TYPES.enum;
143 const t = TYPES[field.type];
144 if (!t) throw new Error(`Unexpected type: ${field.type}`);
145 return t;
146}
147
148// JS_STRING serializes numeric scalars as strings — applies to every TYPES entry except the non-numeric ones.
149function fieldShouldUseStringAsNumber(field) {

Callers 4

compileScalarFieldReadFunction · 0.85
compilePackedReadFunction · 0.85
compileFieldWriteFunction · 0.85
willSupportPackedFunction · 0.85

Calls 2

isEnumFunction · 0.85
getTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…