Skip to main content
Module

x/earthstar/src/entries/npm.ts>globToRegex

Storage for private, distributed, offline-first applications.
Go to Latest
variable globToRegex
import { globToRegex } from "https://deno.land/x/earthstar@v10.0.2/src/entries/npm.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