Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Couple of minor typos #10

am-a opened this Issue · 1 comment

2 participants


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.

function middleware1(req, res) {
  if(~req.url.indexOf('foo')) {
    return false;

What's that before the req?


@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.