diff --git a/.npmignore b/.npmignore index f16fc41..d2cf0b0 100644 --- a/.npmignore +++ b/.npmignore @@ -2,3 +2,7 @@ tests/ test/ *.test.js testing/ +examples/ +*.lock +.eslintrc.js +.travis.yml diff --git a/package.json b/package.json index 81d2c99..155a42f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uci/base", - "version": "0.1.6", + "version": "0.1.7", "description": "Multi type and transport JSON packet communication base class. Used in UCI extended classes", "main": "src/base", "scripts": { diff --git a/src/base.js b/src/base.js index a9b6a56..0a57bfb 100644 --- a/src/base.js +++ b/src/base.js @@ -27,8 +27,8 @@ export default class Base extends EventEmitter { this._defaultCmds = commands this._namespaces = namespaces if (opts.useRootNS) { // add root of instance to checking for command functions - not recommended! - this._namespaces.s.push(null) - this._namespaces.c.push(null) + this._namespaces.s.splice(-1,0,null) + this._namespaces.c.splice(-1,0,null) } this.bindFuncs = bindFuncs // predefined sockets: @@ -217,7 +217,7 @@ export default class Base extends EventEmitter { consumersProcessor(func) { for(let name of Object.keys(this.socket)){ if (this.socket[name].type ==='c') { - this.socketNamedProcessor(func,name) + this.socketNameProcessor(func,name) } } } diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index 2ccbe46..0000000 --- a/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/