3 ms·
`request.statusCode == 200 && { body: {} } || request.statusCode == 404 && 'Not Found' || throw new Error('Something happened')` This is basically what they co
by madamelic 9y ago
`request.statusCode == 200 && { body: {} } || request.statusCode == 404 && 'Not Found' || throw new Error('Something happened')`
This is basically what they could translate into without having if/else or nested ternaries.
I'm not sure if it is much better than either but I like it more.