ssbc / ssb-keys

keyfile operations for ssb
36 stars 26 forks source link

Use number literals that are valid in strict mode #39

Closed staltz closed 7 years ago

staltz commented 7 years ago

I understand that 0400 resembles the respective unix permissions code, but such literal is invalid under strict mode, according to the spec: http://www.ecma-international.org/ecma-262/6.0/#sec-additional-syntax-numeric-literals

In React Native, strict mode is always enabled (as far as I know), so with 0400 we cannot run this script, so I'm modifying it to 400.

dominictarr commented 7 years ago

0400 != 400! the zero prefix means base 8 so 400 is actually 256. okay strict does allow hex literals, so we should use 0x100 since this is actually a binary flag, and bit alignment is more obvious in hex than in base10.

dominictarr commented 7 years ago

fixed in 7.0.10!

staltz commented 7 years ago

Thanks!