forked from vitaliy-gis/worker-msg-test
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
646 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
dist | ||
node_modules | ||
.parcel-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.