import { queryByGlob } from "https://deno.land/x/earthstar@v10.2.0/src/entries/npm.ts";
Find documents whose path matches the glob string. See documentation for globToQueryAndRegex for details on glob strings.
You can specify additional query options by providing a moreQueryOptions
object.
For example, you might want to set { contentLengthGt: 0 } to skip documents
with empty content (e.g. "deleted" documents).
moreQueryOptions
will override the glob's query, so it's best to avoid setting
path
, pathStartsWith
or pathEndsWith
in your moreQueryOptions unless you
intend to override the glob's query.
Type Parameters
optional
F = DefaultFormatsParameters
replica: Replica
optional
moreQueryOptions: Omit<Query<[string]>, "formats"> = [UNSUPPORTED]optional
formats: FormatsArg<F>Returns
Promise<FormatDocType<F>[]>