forked from juliangruber/parse-apache-directory-index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.js
20 lines (19 loc) · 1.71 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const parse = require('.');
console.log(parse(`
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /foo/bar</title>
</head>
<body>
<h1>Index of /foo/bar</h1>
<table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="beep/">beep/</a> </td><td align="right">25-May-2016 11:53 </td><td align="right"> - </td><td> </td></tr>
<tr><td valign="top"><img src="/icons/file.gif" alt="[]"></td><td><a href="boop20160518/">boop20160518/</a> </td><td align="right">19-May-2016 17:57 </td><td align="right"> 5.4M </td><td> </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="jazz20160518/">jazz20160518/</a> </td><td align="right">19-May-2016 19:04 </td><td align="right"> - </td><td> </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="punk20160518/">punk20160518/</a> </td><td align="right">19-May-2016 17:47 </td><td align="right"> - </td><td> </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="space20160518/">space20160518/</a> </td><td align="right">19-May-2016 19:03 </td><td align="right"> - </td><td> </td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
</body></html>
`));