Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Commit e0ca034

Browse files
author
Yevgeny Pats
authored
Merge pull request #12 from bookmoons/path
Add path fuzzer
2 parents 4087bbe + 32ec7a4 commit e0ca034

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

examples/path/fuzz.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const path = require('path')
2+
3+
async function fuzz (bytes) {
4+
const string = String.fromCodePoint(...bytes)
5+
path.basename(string)
6+
path.dirname(string)
7+
path.extname(string)
8+
path.isAbsolute(string)
9+
path.join(string)
10+
path.normalize(string)
11+
path.parse(string)
12+
path.resolve(string)
13+
path.toNamespacedPath(string)
14+
}
15+
16+
exports.fuzz = fuzz

examples/path/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "path-fuzz",
3+
"version": "1.0.0",
4+
"main": "fuzz.js",
5+
"license": "ISC"
6+
}

0 commit comments

Comments
 (0)