Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 29, 2024 via pnpm

protobufjs 7.2.5

Protocol Buffers for JavaScript (& TypeScript).
Package summary
Share
1
issue
1
high severity
meta
1
3
licenses
11
BSD-3-Clause
2
MIT
1
Apache-2.0
Package created
1 Mar 2013
Version published
22 Aug 2023
Maintainers
2
Total deps
14
Direct deps
12
License
BSD-3-Clause

Issues

1

1 high severity issue

high
via: protobufjs@7.2.5
Collapse
Expand

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
11 Packages, Including:
@protobufjs/aspromise@1.1.2
@protobufjs/base64@1.1.2
@protobufjs/codegen@2.0.4
@protobufjs/eventemitter@1.1.0
@protobufjs/fetch@1.1.0
@protobufjs/float@1.0.2
@protobufjs/inquire@1.1.0
@protobufjs/path@1.1.2
@protobufjs/pool@1.1.0
@protobufjs/utf8@1.1.0
protobufjs@7.2.5

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
@types/node@20.12.7
undici-types@5.26.5

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
1 Packages, Including:
long@5.2.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

12
All Dependencies CSV
β“˜ This is a list of protobufjs 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@protobufjs/aspromise1.1.22.53 kBBSD-3-Clause
prod
@protobufjs/base641.1.23.17 kBBSD-3-Clause
prod
@protobufjs/codegen2.0.43.33 kBBSD-3-Clause
prod
@protobufjs/eventemitter1.1.02.7 kBBSD-3-Clause
prod
@protobufjs/fetch1.1.03.25 kBBSD-3-Clause
prod
@protobufjs/float1.0.25.89 kBBSD-3-Clause
prod
@protobufjs/inquire1.1.02.21 kBBSD-3-Clause
prod
@protobufjs/path1.1.22.64 kBBSD-3-Clause
prod
@protobufjs/pool1.1.02.5 kBBSD-3-Clause
prod
@protobufjs/utf81.1.09.4 kBBSD-3-Clause
prod
@types/node20.12.71.94 MBMIT
prod
long5.2.324.15 kBApache-2.0
prod

Visualizations

Frequently Asked Questions

What does protobufjs do?

Protobufjs is a pure JavaScript and TypeScript library that provides a language-neutral, platform-neutral, extensible way of serializing structured data. It's designed for use in communications protocols, data storage, and more. It is a Protocol Buffers (Protobuf) implementation targeting Node.js and browsers. It can parse and compile .proto definition files into ready-to-use message classes, convert between JSON and typed arrays, and dynamically generate message types or bundle an optimized version of all schema types. The generated message types are reflection-based by default, thus being comparable to dynamic messages in other languages.

How do you use protobufjs?

To use protobufjs in your Node.js or JavaScript applications, first, you need to install protobufjs via npm with the following command:

npm install protobufjs

Next, you can require protobufjs in your project as shown below:

var protobuf = require("protobufjs");

The protobufjs library provides several utility functions for working with Protocol Buffers, including load, encode, decode, and verify as well as numerous others. Here is a sample usage:

protobuf.load("awesome.proto", function(err, root) {
    if (err) throw err;

    var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage");
    var payload = { awesomeField: "AwesomeString" };
    var errMsg = AwesomeMessage.verify(payload);

    if (errMsg) throw Error(errMsg);

    var message = AwesomeMessage.create(payload); 
    var buffer = AwesomeMessage.encode(message).finish();
    var decodedMessage = AwesomeMessage.decode(buffer);
});

In the provided example, protobufjs loads a .proto file, looks up a message type and verifies its payload. Then, it creates a valid message, encodes it to a buffer, and finally decodes the buffer back to a message.

Where are the protobufjs docs?

The documentation for protobufjs is located right within the project's Github repository README file, the link is: Protobuf.js README. Further detailed API documentation for more advanced uses and concepts can be accessed at API Documentation. Also, users can access the CHANGELOG for updates, fixes, and enhancements. Community support can be found on StackOverflow with the protobuf.js tag.