Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upInvalid number: number in octal form #484
Comments
This comment has been minimized.
This comment has been minimized.
|
iirc there is some inconsistency between runtimes so it's better to just not use it... |
This comment has been minimized.
This comment has been minimized.
|
@mafintosh Do you remember the simple way to use octals that we came up with? |
This comment has been minimized.
This comment has been minimized.
|
@grunjol You can actually prefix the number with > 0xFF // ES5: hexadecimal
255
> 0b11 // ES6: binary
3
> 0o10 // ES6: octal
8We can use ES6 freely in WebTorrent Desktop since it's an Electron app and there's no old browsers to worry about :) |
This comment has been minimized.
This comment has been minimized.
|
great! |
feross
closed this
Apr 7, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@mafintosh right! |
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
grunjol commentedApr 6, 2016
the same way you write 0xFF as hexadecimal (and it validates), should
standardallow0755be a valid number in octal representation?In webtorrent/webtorrent-desktop#326 ended up using
parseInt('0755',8)