Sha256: 08b37aad3872f8cfb53b2d45f5c36cecb46cdbd317584de48b4e2bd30624eab9
Contents?: true
Size: 323 Bytes
Versions: 69
Compression:
Stored size: 323 Bytes
Contents
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;
Version data entries
69 entries across 69 versions & 2 rubygems