Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/earthstar/src/query/query-helpers.ts>globToRegex

Storage for private, distributed, offline-first applications.
Go to Latest
variable globToRegex
import { globToRegex } from "https://deno.land/x/earthstar@v10.2.2/src/query/query-helpers.ts";

A helper used by globToQueryAndRegex -- see that function for details.

This function simply turns a glob string into a regex. The other function calls this one, but sometimes discards the regex if it's not needed because it can make a good enough Earthstar query.

type

(glob: string, forceEntireMatch?: boolean) => string