Skip to content

Commit

Permalink
add debug field
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGruber committed Oct 4, 2024
1 parent de744ec commit 29060f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/dataschema.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="node" />
import "h1z1-buffer";
export interface h1z1Buffer extends Buffer {
writeBytes(value: any, offset: number, length?: any): any;
Expand Down
3 changes: 3 additions & 0 deletions src/dataschema.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ function parse(fields, dataToParse, offset) {
}
result[field.name] = elements;
break;
case "debug":
console.log(field.name);
break;
case "debugoffset":
result[field.name] = offset;
break;
Expand Down
3 changes: 3 additions & 0 deletions src/dataschema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ function parse(fields: any, dataToParse: Buffer, offset: number): any {
}
result[field.name] = elements;
break;
case "debug":
console.log(field.name);
break;
case "debugoffset":
result[field.name] = offset;
break;
Expand Down

0 comments on commit 29060f3

Please sign in to comment.