🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

from-protobuf-object

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

from-protobuf-object

fromObject method for protobuf

1.0.3
latest
Source
npm
Version published
Maintainers
0
Created
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

grpc

FAQs

Package last updated on 30 Aug 2024

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