Skip to content

Commit

Permalink
docs: fixed example in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon4ik committed Aug 13, 2024
1 parent cdffb7e commit 64d964b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ const PersonStruct = grechabuf.createStruct({
),
health: grechabuf.i8(),
food: grechabuf.i8(),

lostBrainCells: grechabuf.u32(),
})

// and just serialize!
const buffer = PersonStruct.serialize({
name: "John Doe",
roles: ["Admin", "TsodingSessionsEnjoyer"],
health: 1,
food: 1,
moving: 1,
health: 100,
food: 77,
lostBrainCells: 69420
})
```
Expand Down

0 comments on commit 64d964b

Please sign in to comment.