{"_id":"protobuf-schema","_rev":"370469","name":"protobuf-schema","description":"No nonsense protobuf schema parser written in Javascript","dist-tags":{"latest":"1.5.1"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2021-07-26T06:59:44.000Z","created":"2014-07-28T20:13:38.518Z","1.5.1":"2015-03-26T16:06:12.278Z","1.5.0":"2015-02-19T11:42:06.507Z","1.4.2":"2014-12-26T20:14:39.256Z","1.4.1":"2014-12-09T18:57:44.513Z","1.4.0":"2014-12-01T10:31:46.742Z","1.3.0":"2014-10-16T06:03:49.329Z","1.2.0":"2014-10-12T01:46:33.574Z","1.1.0":"2014-09-25T22:24:31.586Z","1.0.2":"2014-08-13T22:42:53.703Z","1.0.1":"2014-07-29T08:01:43.455Z","1.0.0":"2014-07-28T20:37:18.575Z","0.0.0":"2014-07-28T20:13:38.518Z"},"users":{"jdaihl":true},"author":{"name":"Mathias Buus"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"versions":{"1.5.1":{"name":"protobuf-schema","version":"1.5.1","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"standard && tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"standard":"^2.6.5","tape":"^2.13.4"},"gitHead":"74cb2c14b4c2857a047ef7ac230f7cf63dc715df","_id":"protobuf-schema@1.5.1","_shasum":"10912ead14fdd90599ed1bb8c6ed9681fbbaed1d","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"10912ead14fdd90599ed1bb8c6ed9681fbbaed1d","size":6802,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.5.1.tgz"},"directories":{},"publish_time":1427385972278,"_cnpm_publish_time":1427385972278,"_hasShrinkwrap":false},"1.5.0":{"name":"protobuf-schema","version":"1.5.0","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"standard && tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"standard":"^2.6.5","tape":"^2.13.4"},"gitHead":"a2bba178649988e28cc88850a99e3ed268ae815d","_id":"protobuf-schema@1.5.0","_shasum":"c735fd4bf1147edd8e16aa191e1fb1fddb33671b","_from":".","_npmVersion":"2.5.1","_nodeVersion":"1.2.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"c735fd4bf1147edd8e16aa191e1fb1fddb33671b","size":6786,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.5.0.tgz"},"directories":{},"publish_time":1424346126507,"_cnpm_publish_time":1424346126507,"_hasShrinkwrap":false},"1.4.2":{"name":"protobuf-schema","version":"1.4.2","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"d5d691446e7184cf241cdbc94e80a14394593db7","_id":"protobuf-schema@1.4.2","_shasum":"fa60e79eca88cdc809a864c6d9817dd5f1685455","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"fa60e79eca88cdc809a864c6d9817dd5f1685455","size":6771,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.4.2.tgz"},"directories":{},"publish_time":1419624879256,"_cnpm_publish_time":1419624879256,"_hasShrinkwrap":false},"1.4.1":{"name":"protobuf-schema","version":"1.4.1","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"49f1cdec3338ceb82fe7a5707954037d638de177","_id":"protobuf-schema@1.4.1","_shasum":"fcb0d0ba3fbc0198cf0c4948837114675803c6c8","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"fcb0d0ba3fbc0198cf0c4948837114675803c6c8","size":6711,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.4.1.tgz"},"directories":{},"publish_time":1418151464513,"_cnpm_publish_time":1418151464513,"_hasShrinkwrap":false},"1.4.0":{"name":"protobuf-schema","version":"1.4.0","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"4223bebf0b40928dcfe8cc2ecb5140778053a5fe","_id":"protobuf-schema@1.4.0","_shasum":"c037906a915ed7cd28eebc9edf652c234546c783","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"c037906a915ed7cd28eebc9edf652c234546c783","size":6693,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.4.0.tgz"},"directories":{},"publish_time":1417429906742,"_cnpm_publish_time":1417429906742,"_hasShrinkwrap":false},"1.3.0":{"name":"protobuf-schema","version":"1.3.0","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"56c5b8465970f18d54bca22ec8b09d1608846b2c","_id":"protobuf-schema@1.3.0","_shasum":"d2457ad1a6f3de9feec0edb98b12b5a1356817a5","_from":".","_npmVersion":"2.1.3","_nodeVersion":"0.10.32","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"d2457ad1a6f3de9feec0edb98b12b5a1356817a5","size":6477,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.3.0.tgz"},"directories":{},"publish_time":1413439429329,"_cnpm_publish_time":1413439429329,"_hasShrinkwrap":false},"1.2.0":{"name":"protobuf-schema","version":"1.2.0","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"c39c896b721066ea98294dc43626ac864050a312","_id":"protobuf-schema@1.2.0","_shasum":"b7aa3ace0187b4e211ac69f3184e293f54644e47","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"b7aa3ace0187b4e211ac69f3184e293f54644e47","size":5757,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.2.0.tgz"},"directories":{},"publish_time":1413078393574,"_cnpm_publish_time":1413078393574,"_hasShrinkwrap":false},"1.1.0":{"name":"protobuf-schema","version":"1.1.0","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"95ee0d107c8708375d4d800ee175f269ac9cf358","_id":"protobuf-schema@1.1.0","_shasum":"7765a3b171bc8dc4121d40013b6de313d7b2fc3d","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"7765a3b171bc8dc4121d40013b6de313d7b2fc3d","size":5304,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.1.0.tgz"},"directories":{},"publish_time":1411683871586,"_cnpm_publish_time":1411683871586,"_hasShrinkwrap":false},"1.0.2":{"name":"protobuf-schema","version":"1.0.2","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"4c3031b55955cdae22cac21eb3ddcece04849a20","_id":"protobuf-schema@1.0.2","_shasum":"7f7bb96b37faa43aa05f3be9f2d9b7f9f18d673b","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"7f7bb96b37faa43aa05f3be9f2d9b7f9f18d673b","size":4117,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.0.2.tgz"},"directories":{},"publish_time":1407969773703,"_cnpm_publish_time":1407969773703,"_hasShrinkwrap":false},"1.0.1":{"name":"protobuf-schema","version":"1.0.1","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"36b30ea2aaea0cd380f778669c921cffd0e44122","_id":"protobuf-schema@1.0.1","_shasum":"2764503f381622be20283d54c1d47d973561c1aa","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"2764503f381622be20283d54c1d47d973561c1aa","size":3949,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.0.1.tgz"},"directories":{},"publish_time":1406620903455,"_cnpm_publish_time":1406620903455,"_hasShrinkwrap":false},"1.0.0":{"name":"protobuf-schema","version":"1.0.0","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","devDependencies":{"tape":"^2.13.4"},"gitHead":"4c46d1224c0264be8eec825293dbb4f64f49e02a","_id":"protobuf-schema@1.0.0","_shasum":"c6cd19b566a1a5855816816140bd92ed075b0a0c","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"c6cd19b566a1a5855816816140bd92ed075b0a0c","size":3828,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-1.0.0.tgz"},"directories":{},"publish_time":1406579838575,"_cnpm_publish_time":1406579838575,"_hasShrinkwrap":false},"0.0.0":{"name":"protobuf-schema","version":"0.0.0","description":"No nonsense protobuf schema parser written in Javascript","main":"index.js","scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/protobuf-schema"},"keywords":["protobuf","protocol","buffers","schema","parser","parse"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"homepage":"https://github.com/mafintosh/protobuf-schema","gitHead":"b608d9a5aa8f8045c1f5c99336374e16b0308a35","_id":"protobuf-schema@0.0.0","_shasum":"bbcba5216561e9b95b5bcae4510b0384b65633d8","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"bbcba5216561e9b95b5bcae4510b0384b65633d8","size":2913,"noattachment":false,"key":"/protobuf-schema/-/protobuf-schema-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protobuf-schema/download/protobuf-schema-0.0.0.tgz"},"directories":{},"publish_time":1406578418518,"_cnpm_publish_time":1406578418518,"_hasShrinkwrap":false}},"readme":"# protobuf-schema\n\nNo nonsense [protobuf](https://code.google.com/p/protobuf/) schema parser written in Javascript\n\n``` js\nnpm install protobuf-schema\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/protobuf-schema.svg?style=flat)](http://travis-ci.org/mafintosh/protobuf-schema)\n\n## Usage\n\nFirst save the following file as `example.proto`\n\n```\nmessage Point {\n  required int32 x = 1;\n  required int32 y=2;\n  optional string label = 3;\n}\n\nmessage Line {\n  required Point start = 1;\n  required Point end = 2;\n  optional string label = 3;\n}\n```\n\nThe run the following example\n\n``` js\nvar fs = require('fs')\nvar schema = require('protobuf-schema')\n\n// pass a buffer or string to schema.parse\nvar sch = schema.parse(fs.readFileSync('example.proto'))\n\n// will print out the schema as a javascript object\nconsole.log(sch)\n```\n\nRunning the above example will print something like\n\n``` js\n{\n  package: null,\n  enums: [],\n  messages: [{\n    name: 'Point',\n    enums: [],\n    messages: [],\n    fields: [{\n      name: 'x',\n      type: 'int32',\n      tag: 1,\n      required: true,\n      repeated: false,\n      options: {}\n    }, {\n      name: 'y',\n      type: 'int32',\n      tag: 2,\n      required: true,\n      repeated: false,\n      options: {}\n    }, {\n      name: 'label',\n      type: 'string',\n      tag: 3,\n      required: false,\n      repeated: false,\n      options: {}\n    }]\n  }, {\n    name: 'Line',\n    enums: [],\n    messages: [],\n    fields: [{\n      name: 'start',\n      type: 'Point',\n      tag: 1,\n      required: true,\n      repeated: false,\n      options: {}\n    }, {\n      name: 'end',\n      type: 'Point',\n      tag: 2,\n      required: true,\n      repeated: false,\n      options: {}\n    }, {\n      name: 'label',\n      type: 'string',\n      tag: 3,\n      required: false,\n      repeated: false,\n      options: {}\n    }]\n  }],\n  options:{}\n}\n```\n\n## API\n\n#### `schema.parse(protobufSchemaBufferOrString)`\n\nParses a .proto schema into a javascript object\n\n#### `schema.stringify(schema)`\n\nStringifies a parsed schema back into .proto format\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/protobuf-schema","bugs":{"url":"https://github.com/mafintosh/protobuf-schema/issues"},"license":"MIT"}