lib/SelectorMatchers.js
function(property, value){
        //When doing direct comparisons, do some conversions between numbers, booleans, null/undefined since
        //the value in the selector always comes through as a string
        if(_.isNumber(property)){
            return property === parseInt(value);
        }
        else if(_.isBoolean(property)){
            return property === (value === 'true' ? true : false);
        }
        else if(value === "null"){
            return property === null;
        }
        return property === value;
    }
function(property, value){
        //When doing direct comparisons, do some conversions between numbers, booleans, null/undefined since
        //the value in the selector always comes through as a string
        if(_.isNumber(property)){
            return property === parseInt(value);
        }
        else if(_.isBoolean(property)){
            return property === (value === 'true' ? true : false);
        }
        else if(value === "null"){
            return property === null;
        }
        return property === value;
    }
function ( property , value ) { //When doing direct comparisons, do some conversions between numbers, booleans, null/undefined since //the value in the selector always comes through as a string if ( _ . isNumber ( property ) ) { return property === parseInt ( value ) ; } else if ( _ . isBoolean ( property ) ) { return property === ( value === 'true' ? true : false ) ; } else if ( value === "null" ) { return property === null ; } return property === value ; }
Does a equality comparison, handling for the fact that value is always a string. Supports casting
of values into numbers, booleans, and null.
@param  {Mixed}  property Element prop value to check
@param  {String} value    CSS selector value to compare
@return {Bool}            Whether property and value match
Does a equality comparison handling for the fact that value is always a string . Supports casting of values into numbers booleans and null .