Comparing version 3.0.0 to 3.0.1
@@ -197,2 +197,3 @@ const querystring = require('querystring') | ||
} | ||
API.name = dbName | ||
API.jsonRequest = jsonRequest | ||
@@ -199,0 +200,0 @@ return API |
@@ -6,2 +6,3 @@ const mapDoc = (res) => res.rows.map(row => row.doc) | ||
return Object.assign(API, { | ||
designDocName, | ||
viewCustom: function (viewName, query) { | ||
@@ -8,0 +9,0 @@ return API.view(designDocName, viewName, query) |
@@ -17,3 +17,3 @@ { | ||
}, | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"main": "lib/cot.js", | ||
@@ -20,0 +20,0 @@ "dependencies": { |
@@ -9,3 +9,4 @@ const should = require('should') | ||
const db = dbHandler('bar') | ||
Object.keys(db).length.should.equal(dbHanlderFunctions.length) | ||
db.name.should.equal('bar') | ||
Object.keys(db).length.should.equal(dbKeys.length) | ||
dbHanlderFunctions.forEach(function (fnName) { | ||
@@ -18,4 +19,4 @@ db[fnName].should.be.a.Function() | ||
const db = cot({ port: 80, hostname: 'foo' })('bar', 'buzz') | ||
Object.keys(db).length.should.equal(withViewFunctions.length) | ||
withViewFunctions.forEach(function (fnName) { | ||
Object.keys(db).length.should.equal(dbKeysWithViewFunctions.length) | ||
dbHanlderFunctionsWithViewFunctions.forEach(function (fnName) { | ||
db[fnName].should.be.a.Function() | ||
@@ -61,3 +62,3 @@ }) | ||
const withViewFunctions = dbHanlderFunctions.concat([ | ||
const viewFunctions = [ | ||
'viewCustom', | ||
@@ -68,2 +69,7 @@ 'viewByKeysCustom', | ||
'viewByKeys' | ||
]) | ||
] | ||
const dbHanlderFunctionsWithViewFunctions = dbHanlderFunctions.concat(viewFunctions) | ||
const dbKeys = [ 'name' ].concat(dbHanlderFunctions) | ||
const dbKeysWithViewFunctions = [ 'name', 'designDoc' ].concat(dbHanlderFunctions, viewFunctions) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
65607
683
0