jsproto
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

jsproto

A wrapper for protobuf.js to be able to use their much faster parsers with google's officially supported javascript protobuf library.

Usage:

Serialization:

const proto = new RequestMessageP();
const serialized = jsproto.serialize(proto.constructor, proto, jspb); // Returns type Buffer in node.js, otherwise Uint8Array, like protobuf.js

Deserialization:

const data = new Buffer(...)
const deserialized = jsproto.deserialize(ResponseMessageP, data, jspb); // returns an instance of ResponseMessageP

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    57
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    57
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i jsproto

Weekly Downloads

57

Version

0.1.3

License

MIT

Unpacked Size

158 kB

Total Files

27

Last publish

Collaborators

  • jamiees2