enable JSHint's "bitwise" test

This commit is contained in:
Jeff Williams 2012-07-04 15:06:11 -07:00
parent 77f505f2a1
commit 40898c19a1
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{
"bitwise": false,
"bitwise": true,
"curly": false,
"eqeqeq": false,
"forin": false,

View File

@ -52,7 +52,11 @@ var dictionary = {
/** @function */
isNamespace: function(kind) {
return ( ~ _namespaces.indexOf(kind) );
if ( _namespaces.indexOf(kind) !== -1) {
return true;
}
return false;
},
/** @function */

View File

@ -82,7 +82,7 @@ function parseVariable(type) {
function parseTypes(type) {
var types = [];
if ( ~type.indexOf('|') ) {
if ( type.indexOf('|') !== -1 ) {
// remove optional parens, like: { ( string | number ) }
// see: http://code.google.com/closure/compiler/docs/js-for-compiler.html#types
if ( /^\s*\(\s*(.+)\s*\)\s*$/.test(type) ) {