diff --git a/HISTORY.md b/HISTORY.md index 3b8af0e..53389a8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,7 @@ unreleased ========== * Send non-chunked response for `OPTIONS` + * Use `Date.prototype.toLocaleDateString` to format date * deps: accepts@~1.2.9 - deps: mime-types@~2.1.1 - deps: negotiator@0.5.3 diff --git a/index.js b/index.js index 6993266..a76c543 100644 --- a/index.js +++ b/index.js @@ -188,7 +188,7 @@ serveIndex.html = function _html(req, res, files, next, dir, showUp, icons, path var body = str .replace(/\{style\}/g, style.concat(iconStyle(fileData, icons))) - .replace(/\{files\}/g, html(fileData, dir, icons, view)) + .replace(/\{files\}/g, createHtmlFileList(fileData, dir, icons, view)) .replace(/\{directory\}/g, escapeHtml(dir)) .replace(/\{linked-path\}/g, htmlPath(dir)); @@ -227,6 +227,67 @@ serveIndex.plain = function _plain(req, res, files) { res.end(buf); }; +/** + * Map html `files`, returning an html unordered list. + * @private + */ + +function createHtmlFileList(files, dir, useIcons, view) { + var html = ''; + + return html; +} + /** * Sort function for with directories first. */ @@ -359,62 +420,6 @@ function iconStyle (files, useIcons) { return style; } -/** - * Map html `files`, returning an html unordered list. - */ - -function html(files, dir, useIcons, view) { - return ''; -} - /** * Load and cache the given `icon`. *