Skip to content

Commit 4f2e873

Browse files
authored
Merge pull request #2 from FSou1/feature/import-peg-parser-with-es6-module
Provide the usage section of the README.md
2 parents 2255c10 + 6288fd3 commit 4f2e873

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,41 @@ The tool is inspired by [fselect](https://github.com/jhspetersson/fselect).
88

99
## Usage
1010

11-
TBD
11+
In order to use the tool, import the function `fsselect` and call it with an sql-like query. That's easy.
12+
13+
```
14+
import { fsselect } from 'https://deno.land/x/fsquery/mod.ts';
15+
16+
const entries = await fsselect("select * from .");
17+
18+
console.log(entries);
19+
```
20+
21+
Output:
22+
```
23+
[
24+
{
25+
name: "mod.ts",
26+
isFile: true,
27+
isDirectory: false,
28+
isSymlink: false,
29+
size: 141,
30+
accessedAt: 2021-04-14T04:17:46.944Z,
31+
createdAt: 2021-04-13T21:00:12.353Z,
32+
modifiedAt: 2021-04-14T04:16:16.692Z
33+
},
34+
{
35+
name: "tests",
36+
isFile: false,
37+
isDirectory: true,
38+
isSymlink: false,
39+
size: 0,
40+
accessedAt: 2021-04-14T04:16:17.857Z,
41+
createdAt: 2021-04-14T04:16:11.120Z,
42+
modifiedAt: 2021-04-14T04:16:11.120Z
43+
}
44+
]
45+
```
1246

1347
## Functions
1448

0 commit comments

Comments
 (0)