Skip to content

Commit

Permalink
Removing unused ms() utility function, updating order of imports
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Dec 27, 2020
1 parent 9f74774 commit 7283338
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions lib/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ function last (req, res, e, err) {
}
}

function ms (arg = 0, divisor = 1e6, decimal = 3) {
return `${Number(arg / divisor).toFixed(decimal)} ms`;
}

function next (req, res, e, middleware) {
const fn = err => process.nextTick(() => {
let obj = middleware.next();
Expand Down Expand Up @@ -189,7 +185,6 @@ module.exports = {
all,
delimiter,
last,
ms,
next,
params,
parse,
Expand Down
2 changes: 1 addition & 1 deletion lib/woodland.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const path = require("path"),
fs = require("fs"),
etag = require("tiny-etag"),
lru = require("tiny-lru"),
{all, delimiter, next, params, parse, partial, pipeable, last, reduce, stream, writeHead} = require(path.join(__dirname, "utility.js"));
{all, delimiter, last, next, params, parse, partial, pipeable, reduce, stream, writeHead} = require(path.join(__dirname, "utility.js"));

class Woodland extends EventEmitter {
constructor ({cacheSize = 1e3, cacheTTL = 3e5, defaultHeaders = {}, origins = ["*"], indexes = ["index.htm", "index.html"], etags = true, seed = 42, charset = "utf-8"} = {}) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woodland",
"version": "11.1.0",
"version": "11.1.1",
"description": "Lightweight HTTP/HTTP2 router with automatic headers",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 7283338

Please sign in to comment.