diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-05-17 19:57:58 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-05-18 13:11:33 +0200 |
commit | 5803d8605b84ef362cc7f96f9e523eff5d0d81bc (patch) | |
tree | d56d07c53dc1c549ea8b04ce0c3f9517ed5b6300 /README.md | |
parent | 29591422d602ec6b5a3808c3dead91cfbcdbbcf0 (diff) |
lib: implement wildcard() function
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1138,3 +1138,13 @@ regexp('foo.*bar', 'is'); // equivalent to /foo.*bar/is regexp('foo.*bar', 'x'); // throws "Type error: Unrecognized flag character 'x'" regexp('foo.*('); // throws "Syntax error: Unmatched ( or \(" ``` + +#### 6.59. `wildcard(subject, pattern[, nocase])` + +Match the given subject against the supplied wildcard (file glob) pattern. + +If a truish value is supplied as 3rd argument, case insensitive matching is +performed. If a non-string value is supplied as subject, it is converted into +a string before being matched. + +Returns `true` when the subject matches the pattern or `false` when not. |