deno.land / std@0.91.0 / path

Deno Path Manipulation Libraries

Usage:

import * as path from "https://deno.land/std@0.91.0/path/mod.ts";

globToRegExp

Generate a regex based on glob pattern and options This was meant to be using the fs.walk function but can be used anywhere else.

import { globToRegExp } from "https://deno.land/std@0.91.0/path/glob.ts";

globToRegExp("foo/**/*.json", {
  flags: "g",
  extended: true,
  globstar: true,
}); // returns the regex to find all .json files in the folder foo.
std

Version Info

Tagged at
3 years ago