lib/index.js
function (qs) {
        var items = qs.split('&');
        var options = {};
        items = items.filter(function (item) {
            return item.match(/^[\w_-]+=?$|^[\w_-]+=[^=]+$/);
        }).forEach(function (item) {
            var kv = item.split('=');
            var value = kv[1];
            if (value === undefined || value === '') {
                value = true;
            }
            else if (value.toLowerCase() === 'false') {
                value = false;
            }
            options[kv[0]] = value;
        });

        return options;
    }
function (qs) {
        var items = qs.split('&');
        var options = {};
        items = items.filter(function (item) {
            return item.match(/^[\w_-]+=?$|^[\w_-]+=[^=]+$/);
        }).forEach(function (item) {
            var kv = item.split('=');
            var value = kv[1];
            if (value === undefined || value === '') {
                value = true;
            }
            else if (value.toLowerCase() === 'false') {
                value = false;
            }
            options[kv[0]] = value;
        });

        return options;
    }
function ( qs ) { var items = qs . split ( '&' ) ; var options = { } ; items = items . filter ( function ( item ) { return item . match ( / ^[\w_-]+=?$|^[\w_-]+=[^=]+$ / ) ; } ) . forEach ( function ( item ) { var kv = item . split ( '=' ) ; var value = kv [ 1 ] ; if ( value === undefined || value === '' ) { value = true ; } else if ( value . toLowerCase ( ) === 'false' ) { value = false ; } options [ kv [ 0 ] ] = value ; } ) ; return options ; }
Parses the plugin options
@method
@param {string} qs the input query string
@return {Object} the parse result
Parses the plugin options