connection-manager
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -109,3 +109,3 @@ /** | ||
} else { | ||
console.debug('removing ' + type + ' event listeners'); | ||
//console.debug('removing ' + type + ' event listeners'); | ||
client.removeListener.apply( | ||
@@ -196,17 +196,20 @@ buildScope(scope, client), | ||
if (typeof o !== 'object') { | ||
if (typeof cb !== 'function') { | ||
throw new Error('create() callback not defined.'); | ||
} else if (typeof o !== 'object') { | ||
return cb('first parameter object not defined.'); | ||
} else if (typeof cb !== 'function') { | ||
throw new Error('create() callback not defined.'); | ||
} | ||
if ((typeof o.id !== 'string') || | ||
(typeof o.credentials !== 'object') || | ||
(typeof o.listeners !== 'object') || | ||
(typeof o.addListener !== 'function') || | ||
(typeof o.removeListener !== 'function') || | ||
(typeof o.disconnect !== 'function')) { | ||
return cb('properties of object must be: connect(function [' + typeof o.connect + ']) ' + | ||
'listeners(object [' + typeof o.listeners + ']) addListener(function [' + typeof o.addListener + ']) ' + | ||
'removeListener(function [' + typeof o.removeListener + ']) disconnect(function [' + typeof o.disconnect + '])'); | ||
if (typeof o.id !== 'string') { | ||
return cb('missing `id` string property'); | ||
} else if (typeof o.credentials !== 'object') { | ||
return cb('missing `credentials` object property'); | ||
} else if (typeof o.listeners !== 'object') { | ||
return cb('missing `listeners` object property'); | ||
} else if (typeof o.addListener !== 'function') { | ||
return cb('missing `addListener` function property'); | ||
} else if (typeof o.removeListener !== 'function') { | ||
return cb('missing `removeListener` function property'); | ||
} else if (typeof o.disconnect !== 'function') { | ||
return cb('missing `disconnect` function property'); | ||
} | ||
@@ -366,4 +369,4 @@ | ||
if ((!oldID) || (!newID) || (!oldcreds)) { | ||
console.error('move needs at least three parameters oldID, credentials, and newID'); | ||
return undefined; | ||
throw new Error('move needs at least three parameters oldID, credentials, and newID'); | ||
//return undefined; | ||
} | ||
@@ -370,0 +373,0 @@ |
{ | ||
"name": "connection-manager", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Store, checkout & keepalive active connections from multiple locations in your code-base.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
32391
9
844