Socket
Socket
Sign inDemoInstall

from-protobuf-object

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

from-protobuf-object


Version published
Weekly downloads
200
decreased by-37.89%
Maintainers
1
Install size
20.4 kB
Created
Weekly downloads
 

Changelog

Source

1.0.2 (2023-09-26)

Bug Fixes

  • support for binary data (bceae90)

Readme

Source

from-protobuf-object

fromObject method for grpc-web

In general that is opposite for 'toObject' method in protobufjs.

Supports:

  • Simple keys
  • Repeated
  • OneOf
  • Protobuf Map
  • Recursive messages
  • Type validation (at runtime)
  • TypeScript
  • Missing keys validation

Installation

npm i from-protobuf-object

Usage

import { fromProtobufObject } from 'from-protobuf-object';
import { MyMessage } from './my-message_pb';

const myMessage = fromProtobufObject(MyMessage, {
    keyOne: 1,
    keyTwo: 'foo',
    keyThree: {
        keyA: 2,
        keyB: 'bar',
    },
});

Contributing

Contributions are always welcome!

License

Apache-2.0

Keywords

FAQs

Last updated on 26 Sep 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc