Skip to content

Commit

Permalink
Removing prototype from this.items{}
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Jun 6, 2020
1 parent 42dc1ba commit 1ec0ff8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/tiny-lru.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class LRU {
constructor (max = 0, ttl = 0) {
this.first = null;
this.items = {};
this.items = Object.create(null);
this.last = null;
this.max = max;
this.size = 0;
Expand All @@ -16,7 +16,7 @@ class LRU {

clear () {
this.first = null;
this.items = {};
this.items = Object.create(null);
this.last = null;
this.size = 0;

Expand Down
2 changes: 1 addition & 1 deletion lib/tiny-lru.esm.js

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

2 changes: 1 addition & 1 deletion lib/tiny-lru.js

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

2 changes: 1 addition & 1 deletion 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,7 +1,7 @@
{
"name": "tiny-lru",
"description": "Tiny LRU cache for Client or Server",
"version": "7.0.5",
"version": "7.0.6",
"homepage": "https://github.com/avoidwork/tiny-lru",
"author": "Jason Mulligan <jason.mulligan@avoidwork.com>",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/lru.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class LRU {
constructor (max = 0, ttl = 0) {
this.first = null;
this.items = {};
this.items = Object.create(null);
this.last = null;
this.max = max;
this.size = 0;
Expand All @@ -14,7 +14,7 @@

clear () {
this.first = null;
this.items = {};
this.items = Object.create(null);
this.last = null;
this.size = 0;

Expand Down

0 comments on commit 1ec0ff8

Please sign in to comment.