You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin model translates well between the browser and the server because developers can write different plugins to suite > suit the needs of the different environments.
function middleware1(req, res) {
if(~req.url.indexOf('foo')) {
return false;
}
}
What's that before the req?
The text was updated successfully, but these errors were encountered:
@am-a, are you referring to the tilde (~) in if(~req.url.indexOf('foo'))? If so that is the JavaScript equivalent of bitwise not, or [one's] complement. It is in essence a shortened version of if(req.url.indexOf('foo') > -1) or if(~req.url.indexOf('foo') >= 0).
While it is in broad use it has its detractors, and I include myself among them.
Hopefully highlighted in bold...
What problem does it solve?
This plugin model translates well between the browser and the server because developers can write different plugins to suite > suit the needs of the different environments.
What's that before the req?
The text was updated successfully, but these errors were encountered: