By using the inspect code tool of PHPStorm I get the following message:
'recipient_user.id === app.currentUser.id ? true : false'
can be simplified to
'!!(recipient_user.id === app.currentUser.id)'
My question is: since the jslint complains about the use of !!, is it recommended to change the code according the PHPStorm? or it can be rewrite in a better way?
I would change it to:
Since this is guaranteed to return a genuine boolean value (true or false). There’s no need to coerce the return value of the
===operator using!!.