UNPKG
amatch
Version:
latest (1.0.1)
1.0.1
1.0.0
Namespace string matcher
github.com/a-labo/amatch
a-labo/amatch
amatch
/
example
/
example-usage.js
11 lines
(8 loc)
•
221 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
const
amatch =
require
(
'amatch'
) {
let
match =
amatch
(
'foo:*,bar:*'
)
console
.
log
(
match
(
'foo:1234'
))
// => true
console
.
log
(
match
(
'bar:1234'
))
// => true
console
.
log
(
match
(
'baz:1234'
))
// => false
}