@r_masseater/msch 0.58.1 → 0.59.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,12 @@
1
1
  import { Array as Array$1, Option, String as String$1, pipe } from "effect";
2
2
  const ROOT = ".";
3
- const toPosix = String$1.replaceAll("\\", "/");
3
+ const BACKSLASH = "\\";
4
+ const ONE = 1;
5
+ const toPosix = String$1.replaceAll(BACKSLASH, "/");
4
6
  const segments = (path) => String$1.split(path, "/");
7
+ const joinAll = (parts) => Array$1.join(parts, "/");
8
+ const join = (directory) => (name) => Array$1.join(Array$1.filter([directory, name], String$1.isNonEmpty), "/");
9
+ const parent = (path) => joinAll(Array$1.dropRight(segments(path), ONE));
5
10
  const baseName = (path) => pipe(segments(path), Array$1.filter(String$1.isNonEmpty), Array$1.last, Option.getOrElse(() => ""));
6
11
  const afterPrefix = (prefix) => (text) => pipe(Option.liftPredicate(text, String$1.startsWith(prefix)), Option.map(String$1.slice(prefix.length)));
7
12
  const isWithin = (directory) => (path) => String$1.isEmpty(directory) || path === directory || String$1.startsWith(`${directory}/`)(path);
@@ -2115,6 +2120,6 @@ const matcher = (patterns) => {
2115
2120
  };
2116
2121
  String$1.startsWith(NEGATION);
2117
2122
  String$1.slice(1);
2118
- export { relativeTo as a, isWithin as i, baseName as n, toPosix as o, isInside as r, matcher as t };
2123
+ export { join as a, toPosix as c, isWithin as i, baseName as n, parent as o, isInside as r, relativeTo as s, matcher as t };
2119
2124
 
2120
- //# sourceMappingURL=app-B22Gq0no.mjs.map
2125
+ //# sourceMappingURL=app-DcgzLzb0.mjs.map