Gathering detailed insights and metrics for @ln-zap/proto-loader
Gathering detailed insights and metrics for @ln-zap/proto-loader
Gathering detailed insights and metrics for @ln-zap/proto-loader
Gathering detailed insights and metrics for @ln-zap/proto-loader
npm install @ln-zap/proto-loader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
61.8
Supply Chain
82.8
Quality
75.8
Maintenance
100
Vulnerability
98.6
License
@grpc/grpc-js 1.13.4
Updated on May 21, 2025
@grpc/proto-loader 0.7.15
Updated on Apr 18, 2025
@grpc/proto-loader 0.7.14
Updated on Apr 17, 2025
@grpc/grpc-js 1.13.3
Updated on Apr 10, 2025
@grpc/grpc-js 1.13.2
Updated on Mar 26, 2025
@grpc/grpc-js 1.13.1
Updated on Mar 21, 2025
TypeScript (86.85%)
JavaScript (10.49%)
C++ (1.27%)
Shell (0.85%)
Dockerfile (0.22%)
CMake (0.12%)
Batchfile (0.11%)
PowerShell (0.09%)
Total Downloads
31,341
Last Day
15
Last Week
33
Last Month
332
Last Year
1,533
Apache-2.0 License
4,704 Stars
5,078 Commits
674 Forks
72 Watchers
51 Branches
187 Contributors
Updated on Jul 29, 2025
Latest Version
0.5.4
Package Id
@ln-zap/proto-loader@0.5.4
Size
7.84 kB
NPM Version
6.14.4
Node Version
12.13.0
Published on
Apr 07, 2020
Cumulative downloads
Total Downloads
Last Day
0%
15
Compared to previous day
Last Week
-56.6%
33
Compared to previous week
Last Month
135.5%
332
Compared to previous month
Last Year
34.8%
1,533
Compared to previous year
2
5
A utility package for loading .proto
files for use with gRPC, using the latest Protobuf.js package.
Please refer to protobuf.js' documentation
to understands its features and limitations.
1npm install @grpc/proto-loader
1const protoLoader = require('@grpc/proto-loader'); 2const grpcLibrary = require('grpc'); 3// OR 4const grpcLibrary = require('@grpc/grpc-js'); 5 6protoLoader.load(protoFileName, options).then(packageDefinition => { 7 const packageObject = grpcLibrary.loadPackageDefinition(packageDefinition); 8}); 9// OR 10const packageDefinition = protoLoader.loadSync(protoFileName, options); 11const packageObject = grpcLibrary.loadPackageDefinition(packageDefinition);
The options parameter is an object that can have the following optional properties:
Field name | Valid values | Description |
---|---|---|
keepCase | true or false | Preserve field names. The default is to change them to camel case. |
longs | String or Number | The type to use to represent long values. Defaults to a Long object type. |
enums | String | The type to use to represent enum values. Defaults to the numeric value. |
bytes | Array or String | The type to use to represent bytes values. Defaults to Buffer . |
defaults | true or false | Set default values on output objects. Defaults to false . |
arrays | true or false | Set empty arrays for missing array values even if defaults is false Defaults to false . |
objects | true or false | Set empty objects for missing object values even if defaults is false Defaults to false . |
oneofs | true or false | Set virtual oneof properties to the present field's name. Defaults to false . |
includeDirs | An array of strings | A list of search paths for imported .proto files. |
The following options object closely approximates the existing behavior of grpc.load
:
1const options = { 2 keepCase: true, 3 longs: String, 4 enums: String, 5 defaults: true, 6 oneofs: true 7}
No vulnerabilities found.