diff --git a/lib/index.js b/lib/index.js index 80a1c4d..acb1be8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -7,7 +7,7 @@ class Unvault extends Map { * @param {object} options */ async insert(key, interval, update, options) { - this.set(key, { interval, update, ...options }); + this.set(key, Object.assign({ interval, update }, options)); return this.trigger(key, interval !== 0); } @@ -31,7 +31,7 @@ class Unvault extends Map { const value = await tracker.update(key); if (this.has(key) === false) return null; - this.set(key, { ...tracker, value }); + this.set(key, Object.assign(tracker, { value })); if (automated) { setTimeout(() => { this.trigger(key, automated); diff --git a/package.json b/package.json index ca59e27..091586d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unvault", - "version": "0.4.0", + "version": "0.5.0", "description": "A minimal layer for node that allows results of time-consuming tasks to be stored.", "repository": "vaneenige/unvault", "main": "lib/index.js",