@@ -44,7 +44,7 @@ const Parser = require("binary-parser").Parser;
4444
4545// Build an IP packet header Parser
4646const ipHeader = new Parser ()
47- .endianess (" big" )
47+ .endianness (" big" )
4848 .bit4 (" version" )
4949 .bit4 (" headerLength" )
5050 .uint8 (" tos" )
@@ -329,17 +329,17 @@ Move the buffer offset for `relOffset` bytes from the current position. Use a
329329negative ` relOffset ` value to rewind the offset. This method was previously
330330named ` skip(length) ` .
331331
332- ### endianess(endianess )
333- Define what endianess to use in this parser. ` endianess ` can be either
334- ` "little" ` or ` "big" ` . The default endianess of ` Parser ` is set to big-endian.
332+ ### endianness(endianness )
333+ Define what endianness to use in this parser. ` endianness ` can be either
334+ ` "little" ` or ` "big" ` . The default endianness of ` Parser ` is set to big-endian.
335335
336336``` javascript
337337const parser = new Parser ()
338- .endianess (" little" )
339- // You can specify endianess explicitly
338+ .endianness (" little" )
339+ // You can specify endianness explicitly
340340 .uint16be (" a" )
341341 .uint32le (" a" )
342- // Or you can omit endianess (in this case, little-endian is used)
342+ // Or you can omit endianness (in this case, little-endian is used)
343343 .uint16 (" b" )
344344 .int32 (" c" );
345345```
@@ -518,7 +518,7 @@ These options can be used in all parsers.
518518 ```javascript
519519 // simple maginc number validation
520520 const ClassFile = Parser.start()
521- .endianess ("big")
521+ .endianness ("big")
522522 .uint32("magic", { assert: 0xcafebabe });
523523
524524 // Doing more complex assertion with a predicate function
0 commit comments