0.2.4 • Published 8 years ago

wildcard.js v0.2.4

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

Wildcard matching shit.

How to use?

npm install --save wildcard.js
let match = require('wildcard.js');
if(match('bar.foo.com', '**.com')) {
    ...
}

What can you match?

  • *.foo.com

    • matches
      • a.foo.com
      • example.foo.com
    • not match
      • foo.com
      • a.b.c.foo.com
  • **.foo.com

    • matches
      • foo.com
      • this.is.an.example.foo.com
  • /path/**

    • matches
      • /path/foo
      • /path/bar
      • /path/any/thing
  • /hello/**/world

    • matches
      • /hello/world
      • /hello/you/shit/world
    • not match
      • /hello/worl/d
0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago