Protobuf-schema v1.5.1 is a simple JavaScript parser for Protocol Buffers schema files (.proto). It converts .proto definitions into plain JavaScript objects and can also stringify objects back to .proto format. Unlike full protobuf libraries (e.g., protobuf.js), this package focuses solely on schema parsing without serialization or code generation. Development appears sparse (last release in 2016) and the package is likely in maintenance mode. Key differentiator: minimal, pure JS parser with no runtime dependencies.
npm install protobuf-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a hardcoded .proto schema string into a JavaScript object using the named `parse` export.
Use fs.readFileSync('file.proto') to read the file into a string or Buffer.Consider using protobuf.js or @bufbuild/protobuf for modern protobuf support.
Use `import { parse, stringify } from 'protobuf-schema'`.Install @types/protobuf-schema if available, or create own type stubs.
Use `import { parse } from 'protobuf-schema'` or `const { parse } = require('protobuf-schema')`.Remove the syntax line or use proto2 style without quotes.
In Node, use `import fs from 'fs'`. In browser, pass the schema string directly.
No dependency data recorded yet.