Socket
Book a DemoInstallSign in
Socket

protobuf-parser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protobuf-parser

protobuf specification parser. streaming.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

protobuf-parser

a tool for parsing *.proto files and turning them into an AST.


var parse = require('protobuf-parser')
  , fs = require('fs')

fs.createReadStream('example.proto')
  .pipe(parse())
  .on('data', function(node) {
    console.log('node was emitted:', node.type)
  })

// or:

var root = parse.sync(fs.readFileSync('example.proto', 'utf8'))

API

parse = require('protobuf-parser')

parse([function loader(filename, ready)]) -> r/w stream emitting AST nodes as they finish

parseStream.scope() -> the scope at the moment

parse.sync(str data[, function loader(filename, ready)]) -> root AST node

parse.tokenizer() -> r/w tokenizer stream

parse.parser([function loader(filename, ready)]) -> r/w parser stream

License

MIT

Keywords

protobuf

FAQs

Package last updated on 17 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts