jwestbrook / bootstrap-prototype

PrototypeJS based Sleek, intuitive, and powerful front-end framework for faster and easier web development.
http://twitter.github.com/bootstrap
Apache License 2.0
24 stars 15 forks source link

Strange character in code ~ #15

Closed kstubs closed 9 years ago

kstubs commented 9 years ago

Is this a typo, the 1st else if statement leads with a ~. This is found in bootstrap-typehead_prototype.js.

while (item = items.shift()) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item);
  else if (~item.indexOf(this.query)) caseSensitive.push(item);
  else caseInsensitive.push(item);
}
kstubs commented 9 years ago

Never mind. This is a bitwise not operator (if that is what is expected here).

jwestbrook commented 9 years ago

yep directly used from original bootstrap code