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

x/actionify/src/deps/globber.ts>globber

Create and manage your GitHub workflows with TypeScript and Deno.
Latest
function globber
import { globber } from "https://deno.land/x/actionify@0.3.0/src/deps/globber.ts";

This produces an async iterable for searching through the provided patterns relative to the cwd. If cwd is left blank then it defaults to Deno.cwd().

import { globber } from 'https://deno.land/x/globber/mod.ts';

for await (const entry of globber({ extensions: ['.jsonc', '.json'] })) {
  const contents = await Deno.readTextFile(entry.absolute);
  const json = JSON.parse(contents);

  if (json.name === "amazing") {
    // do something
    break;
  }
}

Returns

AsyncGenerator<GlobEntry, void, unknown>