File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11const assert = require ( __dirname + '/assert.js' )
22
3- const possibleValueCount = bytes => {
3+ function possibleValueCount ( bytes ) {
44 const usableBits = 7 * bytes
55 return Math . pow ( 2 , usableBits )
66}
@@ -22,7 +22,7 @@ const BYTE_MASKS = new Map
2222{
2323 let mask = 0
2424 let bitToMaskNext = 7 //0 is least significant bit, 7 is most significant bit
25- for ( const [ bytes , _ ] of UPPER_BOUNDS ) {
25+ for ( const [ bytes , _ ] of UPPER_BOUNDS ) { //eslint-disable-line no-unused-vars
2626 if ( ! bytes ) continue //should never be writing with 0 bytes
2727
2828 BYTE_MASKS . set ( bytes , mask )
Original file line number Diff line number Diff line change 11/*eslint-disable no-undef*/
22const type = new t . FlexUnsignedIntType
33const TWO_7 = Math . pow ( 2 , 7 ) ,
4- TWO_14 = Math . pow ( 2 , 14 )
4+ TWO_14 = Math . pow ( 2 , 14 )
55for ( let value = 0 ; value < TWO_7 ; value ++ ) {
66 const valueBuffer = type . valueBuffer ( value )
77 assert . equal ( valueBuffer , bufferFrom ( [ value ] ) )
You can’t perform that action at this time.
0 commit comments