This commit is contained in:
Alex Yang
2026-03-30 01:04:46 +08:00
parent 050aa421b1
commit f627244b8f
5978 changed files with 1502187 additions and 2947 deletions
+10
View File
@@ -0,0 +1,10 @@
var wildcard = require('..');
var testdata = [
'a.b.c',
'a.b',
'a',
'a.b.d'
];
console.log(wildcard('a.b.*', testdata));
// --> ['a.b.c', 'a.b', 'a.b.d']
+10
View File
@@ -0,0 +1,10 @@
var wildcard = require('..');
var testdata = {
'a.b.c' : {},
'a.b' : {},
'a' : {},
'a.b.d' : {}
};
console.log(wildcard('a.*.c', testdata));
// --> { 'a.b.c': {} }
+7
View File
@@ -0,0 +1,7 @@
var wildcard = require('..');
console.log(wildcard('foo.*', 'foo.bar'));
// --> true
console.log(wildcard('foo.*', 'foo'));
// --> true