memory-pager
Advanced tools
+6
-3
@@ -25,8 +25,11 @@ module.exports = Pager | ||
| Pager.prototype.get = function (i, noMutate) { | ||
| if (i >= this.pages.length) this.pages = grow(this.pages, i, this.length) | ||
| Pager.prototype.get = function (i, noAllocate) { | ||
| if (i >= this.pages.length) { | ||
| if (noAllocate) return | ||
| this.pages = grow(this.pages, i, this.length) | ||
| } | ||
| var page = this.pages[i] | ||
| if (!page && !noMutate) { | ||
| if (!page && !noAllocate) { | ||
| page = this.pages[i] = new Page(i, alloc(this.pageSize)) | ||
@@ -33,0 +36,0 @@ if (i >= this.length) this.length = i + 1 |
+1
-1
| { | ||
| "name": "memory-pager", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "Access memory using small fixed sized buffers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6511
0.63%131
2.34%