{"name":"match-url-wildcard","version":"0.0.3","keywords":["url","match-url","no-proxy","proxy-bypass","wildcard"],"author":{"name":"alexkamaev"},"license":"MIT","_id":"match-url-wildcard@0.0.3","maintainers":[{"name":"alexkamaev","email":"alexikam@gmail.com"}],"homepage":"https://github.com/AlexKamaev/match-url-wildcard#readme","bugs":{"url":"https://github.com/AlexKamaev/match-url-wildcard/issues"},"dist":{"shasum":"5d4ef63b1ceb5d450d1bf6739b2cbb710902f0ad","tarball":"http://registry-npm.ywwl.com/match-url-wildcard/download/match-url-wildcard-0.0.3.tgz","fileCount":5,"integrity":"sha512-8rtUshS1wyryR+t5C4WLzlvYDUX3qEGujlMXaC2FS4WD8YZoLSDKW6vDbTkEHBoocsZH4qWZASPAGa93XCw7iQ==","signatures":[{"sig":"MEQCIBP91qioJDr2rP3mA8d6J9Db2BknBf7YVpNcWepOZw7lAiBuhvvGa5YwIE2oau4yKx1W6LPawPWQHtXrMbnEg9c0Yg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4l+mCRA9TVsSAnZWagAAeWUP/0/fEBcfUL1poMGcE2bN\nWzZHb8KKa/H168iZO0p++PZCSs0siwhHd7jmOQ8zD4tkHwO1jvZGEsjBY6Ci\n0EkUTwYg9y36Jbxdt/PCm6dQfkxr+tBXCAzNXGopB40BqEwQid2nn8Jr+xFf\n69WpUdhmMTL1qfBDzQc3grFZ3/eHEZ7NSvQs5i69EgbJVLG1R+ByK8jR50M0\nUPatIE0LzqKhZsUU0HBW//veemeumMCKTnb0IpmfhUpnY0K0/NkgmIXu6U8o\nh5xD/K4Zy1d9DoGW3HROOTsGDIMswj6hrP5GKBfRaal8HGfqWs1z+O2Ez9Q6\nzYMVf6LBPdvfN9jdjhBeNDYE+FYrr941gthDlYBZRuhC6V9g67ORIPV+E+ah\nd3OQz5zJnOdo0IpuZcI+NFGiFe3GyUHkz5nfu2z+8kN1p1oCq880+oMeBOl2\n4JAbpKeBy5mhSDwI3N3mN6TrffEndIlWNsaGi5g5aPyq5EBflCcqouB4Fsgq\npoLZkSAdOh3+GHA9kLaMmhmndzYKuEjLZWjVVcNxS9bF2cQ7wUjZiF93MWJW\nV/gQMChTrSq+z9u/WtByfTagz7W+dO0Q67IEh+AGx7rRZAUiUiUdR5vhrs9g\nt6PWeBX7X1OFSR33AHjEEwOSxqXEcnfSYxLPqXhHfDmeImQ5ENZVkzDdhCWE\nOoOl\r\n=KpTo\r\n-----END PGP SIGNATURE-----\r\n","size":2560,"noattachment":false,"key":"/match-url-wildcard/-/match-url-wildcard-0.0.3.tgz"},"main":"index.js","gitHead":"8e334dee1190765a7ab9fe9e1c3e86403e63c5cf","scripts":{"test":"mocha"},"_npmUser":{"name":"alexkamaev","email":"alexikam@gmail.com"},"repository":{"url":"git+https://github.com/AlexKamaev/match-url-wildcard.git","type":"git"},"_npmVersion":"6.4.1","description":"Module to match url by pattern with wildcard","directories":{},"_nodeVersion":"10.15.3","dependencies":{"escape-string-regexp":"^1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.4"},"_npmOperationalInternal":{"tmp":"tmp/match-url-wildcard_0.0.3_1558339493600_0.2651803939885571","host":"s3://npm-registry-packages"},"readme":"# Match-url-wildcard [![Build Status](https://travis-ci.org/AlexKamaev/match-url-wildcard.svg?branch=master)](https://travis-ci.org/AlexKamaev/match-url-wildcard)\n## Module to match url by pattern\n\n#### var rule = 'google.com';\n\n    expect(matchUrl('google.com.uk', rule)).to.be.false;\n    expect(matchUrl('docs.google.com', rule)).to.be.false;\n    expect(matchUrl('http://docs.google.com', rule)).to.be.false;\n    expect(matchUrl('https://docs.google.com', rule)).to.be.false;\n    expect(matchUrl('www.docs.google.com', rule)).to.be.false;\n    expect(matchUrl('http://docs.ggoogle.com', rule)).to.be.false;\n    expect(matchUrl('http://goooogle.com', rule)).to.be.false;\n    expect(matchUrl('gogoogle.com', rule)).to.be.false;\n    expect(matchUrl('http://google.com', rule)).to.be.true;\n    expect(matchUrl('https://google.com', rule)).to.be.true;\n    expect(matchUrl('https://google.com/', rule)).to.be.true;\n    expect(matchUrl('google.com/', rule)).to.be.true;\n\n#### rule = 'http://google.com';\n\n    expect(matchUrl('https://google.com', rule)).to.be.false;\n    expect(matchUrl('https://google.com/', rule)).to.be.false;\n    expect(matchUrl('docs.google.com', rule)).to.be.false;\n    expect(matchUrl('http://docs.google.com', rule)).to.be.false;\n    expect(matchUrl('https://docs.google.com', rule)).to.be.false;\n    expect(matchUrl('www.docs.google.com', rule)).to.be.false;\n    expect(matchUrl('http://docs.ggoogle.com', rule)).to.be.false;\n    expect(matchUrl('http://google.com', rule)).to.be.true;\n    expect(matchUrl('google.com/', rule)).to.be.true;\n\n#### rule = 'https://google.com';\n\n    expect(matchUrl('http://google.com', rule)).to.be.false;\n    expect(matchUrl('https://google.com', rule)).to.be.true;\n\n#### ['.google.com', '*.google.com']\n    .forEach(r => {\n        expect(matchUrl('http://google.com', r)).to.be.false;\n        expect(matchUrl('https://google.com', r)).to.be.false;\n        expect(matchUrl('https://google.com/', r)).to.be.false;\n        expect(matchUrl('google.com/', r)).to.be.false;\n        expect(matchUrl('http://docs.ggoogle.com', r)).to.be.false;\n        expect(matchUrl('docs.google.com', r)).to.be.true;\n        expect(matchUrl('http://docs.google.com', r)).to.be.true;\n        expect(matchUrl('https://docs.google.com', r)).to.be.true;\n        expect(matchUrl('www.docs.google.com', r)).to.be.true;\n    });\n\n#### ['.com', '*.com']\n    .forEach(r => {\n        expect(matchUrl('http://google.com.uk', r)).to.be.false;\n        expect(matchUrl('http://google.com', r)).to.be.true;\n        expect(matchUrl('google.com/', r)).to.be.true;\n        expect(matchUrl('docs.google.com', r)).to.be.true;\n        expect(matchUrl('http://docs.google.com', r)).to.be.true;\n        expect(matchUrl('www.docs.google.com', r)).to.be.true;\n    });\n\n#### ['google.', 'google.*']\n    .forEach(r => {\n        expect(matchUrl('docs.google.com', r)).to.be.false;\n        expect(matchUrl('https://docs.google.co.uk', r)).to.be.false;\n        expect(matchUrl('https://docs.google.uk', r)).to.be.false;\n        expect(matchUrl('http://google.com', r)).to.be.true;\n        expect(matchUrl('https://google.co.uk', r)).to.be.true;\n        expect(matchUrl('google.ru/', r)).to.be.true;\n    });\n\n#### ['docs.google.', 'docs.google.*']\n    .forEach(r => {\n        expect(matchUrl('http://google.com', r)).to.be.false;\n        expect(matchUrl('docs.google', r)).to.be.false;\n        expect(matchUrl('https://docs.googlee.com', r)).to.be.false;\n        expect(matchUrl('www.docs.google.co.uk', r)).to.be.false;\n        expect(matchUrl('http://docs.ggoogle.com', r)).to.be.false;\n        expect(matchUrl('http://___docs.google.com', r)).to.be.false;\n        expect(matchUrl('docs.google.en', r)).to.be.true;\n        expect(matchUrl('http://docs.google.co.uk', r)).to.be.true;\n    });\n\n#### ['.google.', '*.google.*']\n    .forEach(r => {\n        expect(matchUrl('http://google.com', r)).to.be.false;\n        expect(matchUrl('docs.google.com', r)).to.be.true;\n        expect(matchUrl('http://docs.google.com', r)).to.be.true;\n        expect(matchUrl('www.docs.google.com', r)).to.be.true;\n        expect(matchUrl('www.my.docs.google.com', r)).to.be.true;\n\n    });\n\n#### ['.docs.google.', '*.docs.google.*']\n    .forEach(r => {\n        expect(matchUrl('http://google.com', r)).to.be.false;\n        expect(matchUrl('docs.google.com', r)).to.be.false;\n        expect(matchUrl('http://docs.google.com', r)).to.be.false;\n        expect(matchUrl('www.docs.google.com', r)).to.be.true;\n        expect(matchUrl('www.my.docs.google.com.eu', r)).to.be.true;\n    });\n\n#### rule = 'docs.*.com';\n\n    expect(matchUrl('docs.google.com', rule)).to.be.true;\n    expect(matchUrl('docs.google.eu.com', rule)).to.be.true;\n    expect(matchUrl('docs.google.ru', rule)).to.be.false;\n    expect(matchUrl('docs.google.co.uk', rule)).to.be.false;\n\n#### rule = 'docs.*.*.com';\n\n    expect(matchUrl('docs.google.com', rule)).to.be.false;\n    expect(matchUrl('docs.google.ru', rule)).to.be.false;\n    expect(matchUrl('my.docs.google.ro.eu.com', rule)).to.be.false;\n    expect(matchUrl('docs.google.co.uk', rule)).to.be.false;\n    expect(matchUrl('docs.google.eu.com', rule)).to.be.true;\n    expect(matchUrl('docs.google.ro.eu.com', rule)).to.be.true;\n\n#### rule = '.docs.*.*.com.';\n\n    expect(matchUrl('my.docs.google.eu.com.ru', rule)).to.be.true;\n\n#### rule = 'docs.g*e.com';\n\n    expect(matchUrl('docs.google.com', rule)).to.be.false;\n\n#### rule = 'localhost';\n\n    expect(matchUrl('localhost', rule)).to.be.true;\n    expect(matchUrl('http://localhost', rule)).to.be.true;\n    expect(matchUrl('my-localhost', rule)).to.be.false;\n    expect(matchUrl('localhost-my', rule)).to.be.false;\n\n#### rule = '127.0.0.1';\n\n    expect(matchUrl('127.0.0.1', rule)).to.be.true;\n    expect(matchUrl('http://127.0.0.1', rule)).to.be.true;\n    expect(matchUrl('https://127.0.0.1', rule)).to.be.true;\n\n#### rule = '127.0.0.';\n\n    expect(matchUrl('127.127.0.0', rule)).to.be.false;\n    expect(matchUrl('127.0.0.2', rule)).to.be.true;\n\n#### rule = '.0.0.';\n\n    expect(matchUrl('127.0.1.2', rule)).to.be.false;\n    expect(matchUrl('127.0.0.2', rule)).to.be.true;\n\n#### rule = '127.*.*.0';\n\n    expect(matchUrl('128.120.120.0', rule)).to.be.false;\n    expect(matchUrl('127.0.0.0', rule)).to.be.true;\n    expect(matchUrl('127.120.120.0', rule)).to.be.true;\n\n#### rule = 'google.com:81';\n\n    expect(matchUrl('google.com', rule)).to.be.false;\n    expect(matchUrl('google.com:80', rule)).to.be.false;\n    expect(matchUrl('google.com:81', rule)).to.be.true;\n\n#### rule = 'google.:81';\n\n    expect(matchUrl('google.com', rule)).to.be.false;\n    expect(matchUrl('google.com:80', rule)).to.be.false;\n    expect(matchUrl('google.com:81', rule)).to.be.true;\n\n#### rule = 'localhost:3000';\n\n    expect(matchUrl('localhost:3000/features/functional/local', rule)).to.be.true;\n    expect(matchUrl('http://localhost:3000/features/functional/local', rule)).to.be.true;\n    expect(matchUrl(null, rule)).to.be.false;\n\n#### rule = 1;\n\n    expect(matchUrl('google', rule)).to.be.false;","publish_time":1558339493904,"_cnpm_publish_time":1558339493904,"dist-tags":{"latest":"0.0.5"}}