Skip to content

Commit

Permalink
Removing an unboxing
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Jul 4, 2016
1 parent de9cb5f commit b5bc637
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
12 changes: 8 additions & 4 deletions lib/etag.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
"use strict";

const path = require("path"),
lru = require("tiny-lru"),
const lru = require("tiny-lru"),
mmh3 = require("murmurhash3js").x86.hash32,
parse = require("tiny-parse"),
regex = require(path.join(__dirname, "regex.js")),
max = 1000,
random = Math.floor(Math.random() * max) + 1;
random = Math.floor(Math.random() * max) + 1,
regex = {
implicitGet: /^(HEAD|GET|OPTIONS)$/,
explicitGet: /^GET$/i,
etag: /ETag:\s/i,
invalid: /^(a|cache|connection|content-(d|e|l|m|r)|d|ex|l|p|r|s|t|u|v|w|x)/
};

function clone (arg) {
return JSON.parse(JSON.stringify(arg));
Expand Down
10 changes: 0 additions & 10 deletions lib/regex.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiny-etag",
"version": "1.0.6",
"version": "1.0.7",
"description": "ETag middleware",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit b5bc637

Please sign in to comment.