Skip to content

Commit 6780a87

Browse files
committed
Add property to relativeTo comment
1 parent 3abd056 commit 6780a87

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Pathy/Path.purs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,12 @@ setExtension p ext = rename (alterExtension (const (NES.fromString ext))) p
269269

270270
infixl 6 setExtension as <.>
271271

272-
-- | Makes a path relative to a reference path.
272+
-- | Makes a path relative to a reference path. This function is best
273+
-- | explaned using this property:
274+
-- |
275+
-- | ```purescript
276+
-- | a == r </> a `relativeTo` r
277+
-- | ```
273278
relativeTo :: forall b. Path Abs b -> Path Abs Dir -> Path Rel b
274279
relativeTo p rp = coeB $ step Init (canonicalize (coeD p)) (canonicalize rp)
275280
where

0 commit comments

Comments
 (0)