2019-10-16 14:39:33 -04:00
|
|
|
# Deno Path Manipulation Libraries
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
|
|
|
```ts
|
|
|
|
import * as path from "https://deno.land/std/path/mod.ts";
|
|
|
|
```
|
2020-05-17 13:24:39 -04:00
|
|
|
|
|
|
|
### globToRegExp
|
|
|
|
|
|
|
|
Generate a regex based on glob pattern and options This was meant to be using
|
|
|
|
the the `fs.walk` function but can be used anywhere else.
|
|
|
|
|
|
|
|
```ts
|
|
|
|
import { globToRegExp } from "https://deno.land/std/path/glob.ts";
|
|
|
|
|
|
|
|
globToRegExp("foo/**/*.json", {
|
|
|
|
flags: "g",
|
|
|
|
extended: true,
|
|
|
|
globstar: true,
|
2020-10-03 16:19:11 -04:00
|
|
|
}); // returns the regex to find all .json files in the folder foo.
|
2020-05-17 13:24:39 -04:00
|
|
|
```
|