Skip to content

Commit

Permalink
transpiled build
Browse files Browse the repository at this point in the history
  • Loading branch information
itanka9 committed Nov 6, 2024
1 parent b074738 commit cd857e0
Show file tree
Hide file tree
Showing 8 changed files with 646 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist
node_modules
.parcel-cache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# json2pbf

Json to binary serializer in a simple and lightweight way.
Simple JSON <-> protobuf codec

## Install

Expand Down
23 changes: 23 additions & 0 deletions dist/lib.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
declare module "json2pbf" {
import Pbf from 'pbf';
export enum JsonType {
Boolean = 1,
Number = 2,
String = 3,
Object = 4,
Array = 5,
Null = 6
}
export enum PackMethod {
Generic = 1,
Columnar = 2,
Row = 3
}
export interface PackOptions {
pbf?: typeof Pbf;
method?: PackMethod;
columns?: Record<string, JsonType>;
}
export function pack(val: any, options?: PackOptions): ArrayBuffer;
export function unpack(arr: ArrayBuffer): any;
}
Loading

0 comments on commit cd857e0

Please sign in to comment.