From 15c5a90153f64356715e4fc2816e1d4154be87dd Mon Sep 17 00:00:00 2001 From: Dave Torres Date: Fri, 9 Aug 2019 17:27:01 -0600 Subject: [PATCH 1/2] Add deconstruct method to context --- src/context.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/context.js b/src/context.js index e0da0c6..1221eee 100644 --- a/src/context.js +++ b/src/context.js @@ -10,12 +10,8 @@ class Context { this.list.push({ name, module }) } - get (name) { - const ctx = this.list.find(ctx => ctx.name === name) - if (!ctx) { - throw new Error('Tried to get context item that doesn\'t exists') - } - return ctx + deconstruct () { + return this.build() } build () { From c20e47efa049657b21278d01565f03f3a9ce405e Mon Sep 17 00:00:00 2001 From: Dave Torres Date: Fri, 9 Aug 2019 17:28:19 -0600 Subject: [PATCH 2/2] Up the version to 0.2.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2675c1e..a7f1a06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unitiweb-express-microservice", - "version": "0.2.6", + "version": "0.2.7", "description": "A simple microservice framework using express", "main": "src/index.js", "scripts": {