Skip to content

Commit

Permalink
Update the TSDoc description
Browse files Browse the repository at this point in the history
  • Loading branch information
axtgr committed Sep 22, 2020
1 parent b8a127d commit 6f88567
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,18 @@ function isMatch(regexp: RegExp, sample: string) {
}

/**
* Creates an isMatch function from one or more glob patterns. The isMatch function
* takes a sample string as its only argument and returns true if the string matches
* the pattern.
* Compiles one or more glob patterns into a RegExp and returns an isMatch function.
* The isMatch function takes a sample string as its only argument and returns true
* if the string matches the pattern(s).
*
* ```js
* outmatch('src/*.js')('src/index.js') //=> true
* ```
*
* ```js
* const isMatch = outmatch('components/*.{?s,?sx}')
* isMatch('components/head.jsx') //=> true
* isMatch('components/body/readme.md') //=> false
* const isMatch = outmatch('*.example.com', { separator: '.' })
* isMatch('foo.example.com') //=> true
* isMatch('foo.bar.com') //=> false
* ```
*/
function outmatch(pattern: string | string[], options?: OutmatchOptions): isMatch {
Expand Down

0 comments on commit 6f88567

Please sign in to comment.