@r_masseater/msch 0.58.0 → 0.59.0

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,11 @@
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 parent = (path) => joinAll(Array$1.dropRight(segments(path), ONE));
5
9
  const baseName = (path) => pipe(segments(path), Array$1.filter(String$1.isNonEmpty), Array$1.last, Option.getOrElse(() => ""));
6
10
  const afterPrefix = (prefix) => (text) => pipe(Option.liftPredicate(text, String$1.startsWith(prefix)), Option.map(String$1.slice(prefix.length)));
7
11
  const isWithin = (directory) => (path) => String$1.isEmpty(directory) || path === directory || String$1.startsWith(`${directory}/`)(path);
@@ -2115,6 +2119,6 @@ const matcher = (patterns) => {
2115
2119
  };
2116
2120
  String$1.startsWith(NEGATION);
2117
2121
  String$1.slice(1);
2118
- export { relativeTo as a, isWithin as i, baseName as n, toPosix as o, isInside as r, matcher as t };
2122
+ export { parent as a, isWithin as i, baseName as n, relativeTo as o, isInside as r, toPosix as s, matcher as t };
2119
2123
 
2120
- //# sourceMappingURL=app-B22Gq0no.mjs.map
2124
+ //# sourceMappingURL=app-BDOrs4YR.mjs.map