All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.bower.lib.node_modules.mout.queryString.contains.js Maven / Gradle / Ivy

var getQuery = require('./getQuery');

    /**
     * Checks if query string contains parameter.
     */
    function contains(url, paramName) {
        var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=`
        return regex.test(getQuery(url));
    }

    module.exports = contains;





© 2015 - 2024 Weber Informatics LLC | Privacy Policy