MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/p0oh1d/in_some_code_i_wrote_about_6_months_ago/
r/badcode • u/MegaBatchGames • Aug 08 '21
6 comments sorted by
12
npm install debug
10
Image Transcription: Code
var debug = (process.argv.includes("--verbose") ? true : false);
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
5
Missed opportunity to use a couple of microservices to asynchronously provide the values for true and false within the ternary operator 😰
2
Have you tried !!(your boolean)?
!!(your boolean)
[removed] — view removed comment
15 u/Super-administrator Aug 09 '21 It might be better to enforce no-unneeded-ternaryhttps://eslint.org/docs/rules/no-unneeded-ternary
15
It might be better to enforce no-unneeded-ternary
no-unneeded-ternary
https://eslint.org/docs/rules/no-unneeded-ternary
12
u/paulsmithkc 👨🏫 Aug 09 '21
npm install debug
10
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Aug 08 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
5
u/mrbodycheetah Aug 09 '21
Missed opportunity to use a couple of microservices to asynchronously provide the values for true and false within the ternary operator 😰
2
u/pyker404 Aug 09 '21
Have you tried
!!(your boolean)?10
u/[deleted] Aug 09 '21
[removed] — view removed comment