Skip to content

Commit a56882c

Browse files
committed
chore: init
0 parents  commit a56882c

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

index.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { parseArgs } from 'node:util';
2+
3+
const options = {
4+
say: {
5+
type: "string",
6+
short: 's'
7+
}
8+
}
9+
10+
const { values } = parseArgs({
11+
options
12+
})
13+
14+
console.log(values)

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "parseargs",
3+
"version": "1.0.0",
4+
"description": "a simple parseArgs example",
5+
"main": "index.mjs",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "Julien Prugne <julien@webeleon.dev>",
10+
"license": "MIT"
11+
}

0 commit comments

Comments
 (0)