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

Function getMapMessage

compile.js:198–204  ·  view source on GitHub ↗
(field)

Source from the content-addressed store, hash-verified

196}
197
198function getMapMessage(field) {
199 const f = (name, type, tag) => ({name, type, tag, oneof: null, repeated: false, options: {}});
200 return {
201 name: `${capitalize(field.name)}Entry`,
202 fields: [f('key', field.map.from, 1), f('value', field.map.to, 2)],
203 };
204}
205
206// Protobuf identifier per spec: starts with a letter or underscore, followed by letters, digits, or underscores.
207// Validated to prevent code injection via untrusted .proto schemas, since names are interpolated into generated JS.

Callers 1

buildContextFunction · 0.85

Calls 2

capitalizeFunction · 0.85
fFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…