Determine if a string matches a pattern.
npm install --save str-is
var str_is = require('str-is')
str_is('foo/bar', 'foo/bar')
// => true
str_is('foo*', 'foobar')
// => true
str_is('baz*', 'foobar')
// => false
// Or you can call the "is" method in string instances and pass the pattern.
// Note: Make sure you already require this module before call the is method.
'foobar'.is('foo*')
// => true