Skip to content

Commit

Permalink
optional export
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Mar 4, 2024
1 parent 39b7a2d commit cc57f8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ import {
ngramsOfAtLeastNWords,
prefixesWithSuffix,
quotedTexts,
regexpEntireString,
regexpTimes,
simplify,
someKewyordMatches,
suffixesWithPrefix,
} from "./index.ts";

import { assertEquals } from "https://deno.land/std@0.192.0/testing/asserts.ts";
import { regexpEntireString } from "./index.ts";

// deno-lint-ignore no-explicit-any
type Func = (...args: any[]) => any;

const testFn =
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const bracketIfNeeded = (s: string) =>
? s
: `(?:${s})`;

const optional = (x: RegExp) =>
export const optional = (x: RegExp) =>
new RegExp(`${bracketIfNeeded(x.source)}?`, x.flags);

export const zeroOrMore = (x: RegExp) =>
Expand Down

0 comments on commit cc57f8b

Please sign in to comment.