Ugly:
if (process.env.MYVAR === 'true')
if (process.env.MYVAR === '1')
Pretty:
if (!!+process.env.MYVAR) // for boolean env vars for =0/=1
This expression uses JavaScript’s string to number dynamic casting of +process.env.VAR and double negates it (!!) to provide the user with true or false results.