Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Backbone has made me a better programmer. Parent comment
Bitwise NOT on -1 will give you 0 -- for any other number, it'll return a truthy value.
It's the same as:
`return item.toLowerCase().indexOf(this.query.toLowerCase()) !== -1`
If you're really dead set on doing things this way, it's safer to prefix with !! to coerce a real boolean:
`return !!~item.toLowerCase().indexOf(this.query.toLowerCase())`
There are no comments on this comment yet.
Bitwise NOT on -1 will give you 0 -- for any other number, it'll return a truthy value.
It's the same as:
`return item.toLowerCase().indexOf(this.query.toLowerCase()) !== -1`
If you're really dead set on doing things this way, it's safer to prefix with !! to coerce a real boolean:
`return !!~item.toLowerCase().indexOf(this.query.toLowerCase())`