From 6f88567b6a8a8e725f22fd710bb4477f25210d99 Mon Sep 17 00:00:00 2001 From: Alex Schneider Date: Tue, 22 Sep 2020 15:27:43 +0700 Subject: [PATCH] Update the TSDoc description --- src/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index c8522b6..244dd5a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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 {