Skip to content

Commit ec6721b

Browse files
yunyun
authored andcommitted
Add isAbsolute
1 parent 644a29b commit ec6721b

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

docs/Node/Path.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,12 @@ parse :: String -> { root :: String, dir :: String, base :: String, ext :: Strin
101101

102102
Parse a path into components.
103103

104+
#### `isAbsolute`
105+
106+
``` purescript
107+
isAbsolute :: String -> Boolean
108+
```
109+
110+
Determines whether path is an absolute path
111+
104112

src/Node/Path.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ exports.sep = path.sep;
4141
exports.delimiter = path.delimiter;
4242

4343
exports.parse = path.parse;
44+
45+
exports.isAbsolute = path.isAbsolute;

src/Node/Path.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ foreign import delimiter :: String
4040

4141
-- | Parse a path into components.
4242
foreign import parse :: String -> { root :: String, dir :: String, base :: String, ext :: String, name :: String }
43+
44+
-- | Determines whether path is an absolute path
45+
foreign import isAbsolute :: String -> Boolean

0 commit comments

Comments
 (0)