Skip to content

Commit e9c68c5

Browse files
chore(docs): auto-generate docs (#22)
Co-authored-by: haithium <128622475+haithium@users.noreply.github.com>
1 parent dc48a81 commit e9c68c5

17 files changed

Lines changed: 1658 additions & 334 deletions

File tree

docs/src/modules/fs.md

Lines changed: 515 additions & 16 deletions
Large diffs are not rendered by default.

docs/src/modules/is.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ is("hello", "STRING") --> true
6767

6868
| Function | Description |
6969
| ------------------------- | ------------------------------------------------------------ |
70+
| [`path(v)`](#fn-path) | Returns `true` when `v` is a valid filesystem path. |
7071
| [`block(v)`](#fn-block) | Returns `true` when `v` is a block device path. |
7172
| [`char(v)`](#fn-char) | Returns `true` when `v` is a character device path. |
7273
| [`device(v)`](#fn-device) | Returns `true` when `v` is a block or character device path. |
@@ -368,7 +369,29 @@ Filesystem path type checks.
368369
>
369370
> Path checks require **LuaFileSystem**
370371
> ([`lfs`](https://github.com/lunarmodules/luafilesystem)) and raise an error if
371-
> it is not installed. <a id="fn-block"></a>
372+
> it is not installed. <a id="fn-path"></a>
373+
374+
#### `path(v)`
375+
376+
Returns `true` when `v` is a valid filesystem path.
377+
378+
**Parameters**:
379+
380+
- `v` (`any`): Value to validate.
381+
382+
**Return**:
383+
384+
- `isPath` (`boolean`): Whether the check succeeds.
385+
386+
**Example**:
387+
388+
```lua
389+
is.path("README.md")
390+
```
391+
392+
> [!NOTE] Returns `true` for broken symlinks.
393+
394+
<a id="fn-block"></a>
372395

373396
#### `block(v)`
374397

docs/src/modules/keyword.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
description: "Lua keyword helpers."
2+
description: "Helpers for Lua keywords and identifiers."
33
---
44

55
# `keyword`
66

7-
Lua keyword helpers.
7+
Helpers for Lua keywords and identifiers.
88

99
## Usage
1010

0 commit comments

Comments
 (0)