11 lines
179 B
JavaScript
11 lines
179 B
JavaScript
|
var wildcard = require('..');
|
||
|
var testdata = {
|
||
|
'a.b.c' : {},
|
||
|
'a.b' : {},
|
||
|
'a' : {},
|
||
|
'a.b.d' : {}
|
||
|
};
|
||
|
|
||
|
console.log(wildcard('a.*.c', testdata));
|
||
|
// --> { 'a.b.c': {} }
|