couchbase-promises
Advanced tools
Comparing version 1.0.1 to 2.0.0
# Change Log | ||
## 2.0 | ||
### 2.0.0 | ||
* Switching to ES2015 syntax. | ||
* Updating Couchnode to latest version. | ||
* The `couchbase` and `bluebird` modules are now `peerDependencies`. | ||
* Bug fix: ensuring the proper `this` context is used when calling promisify. | ||
## 1.0 | ||
### 1.0.1 | ||
* Fixing a leak of the `arguments` object to avoid optimizing compiler bailouts. | ||
* Bug fix: fixing a leak of the `arguments` object to avoid optimizing compiler bailouts. | ||
### 1.0.0 | ||
* Initial release. |
@@ -135,3 +135,5 @@ var addSorting = (function () { | ||
if (cols[i].sortable) { | ||
el = getNthColumn(i).querySelector('.sorter'); | ||
// add the click event handler on the th so users | ||
// dont have to click on those tiny arrows | ||
el = getNthColumn(i).querySelector('.sorter').parentElement; | ||
if (el.addEventListener) { | ||
@@ -138,0 +140,0 @@ el.addEventListener('click', ithSorter(i)); |
'use strict'; | ||
var BucketManager = require('./bucketmgr'); | ||
var promisify = require('./promisify'); | ||
const BucketManager = require('./bucketmgr'); | ||
const LookupInBuilder = require('./lookup-in-builder'); | ||
const MutateInBuilder = require('./mutate-in-builder'); | ||
const promisify = require('./promisify'); | ||
function Bucket(bucket) { | ||
if (!bucket) throw 'No native bucket was provided.'; | ||
this._bucket = bucket; | ||
} | ||
const state = new WeakMap(); | ||
const me = (instance) => { return state.get(instance); }; | ||
Bucket.prototype = { | ||
get clientVersion() { return this._bucket.clientVersion; }, | ||
class Bucket { | ||
constructor(bucket) { | ||
if (!bucket) | ||
throw new Error('No native Bucket was provided.'); | ||
state.set(this, bucket); | ||
} | ||
get configThrottle() { return this._bucket.configThrottle; }, | ||
set configThrottle(val) { this._bucket.configThrottle = val; }, | ||
get clientVersion() { return me(this).clientVersion; } | ||
get connectionTimeout() { return this._bucket.connectionTimeout; }, | ||
set connectionTimeout(val) { this._bucket.connectionTimeout = val; }, | ||
get configThrottle() { return me(this).configThrottle; } | ||
set configThrottle(val) { me(this).configThrottle = val; } | ||
get durabilityInterval() { return this._bucket.durabilityInterval; }, | ||
set durabilityInterval(val) { this._bucket.durabilityInterval = val; }, | ||
get connectionTimeout() { return me(this).connectionTimeout; } | ||
set connectionTimeout(val) { me(this).connectionTimeout = val; } | ||
get durabilityTimeout() { return this._bucket.durabilityTimeout; }, | ||
set durabilityTimeout(val) { this._bucket.durabilityTimeout = val; }, | ||
get durabilityInterval() { return me(this).durabilityInterval; } | ||
set durabilityInterval(val) { me(this).durabilityInterval = val; } | ||
get lcbVersion() { return this._bucket.lcbVersion; }, | ||
get durabilityTimeout() { return me(this).durabilityTimeout; } | ||
set durabilityTimeout(val) { me(this).durabilityTimeout = val; } | ||
get managementTimeout() { return this._bucket.managementTimeout; }, | ||
set managementTimeout(val) { this._bucket.managementTimeout = val; }, | ||
get lcbVersion() { return me(this).lcbVersion; } | ||
get nodeConnectionTimeout() { return this._bucket.nodeConnectionTimeout; }, | ||
set nodeConnectionTimeout(val) { this.nodeConnectionTimeout = val; }, | ||
get managementTimeout() { return me(this).managementTimeout; } | ||
set managementTimeout(val) { me(this).managementTimeout = val; } | ||
get operationTimeout() { return this._bucket.operationTimeout; }, | ||
set operationTimeout(val) { this._bucket.operationTimeout = val; }, | ||
get nodeConnectionTimeout() { return me(this).nodeConnectionTimeout; } | ||
set nodeConnectionTimeout(val) { this.nodeConnectionTimeout = val; } | ||
get viewTimeout() { return this._bucket.viewTimeout; }, | ||
set viewTimeout(val) { this._bucket.viewTimeout = val; } | ||
}; | ||
get operationTimeout() { return me(this).operationTimeout; } | ||
set operationTimeout(val) { me(this).operationTimeout = val; } | ||
Bucket.prototype.append = function(key, fragment, options, callback) { | ||
return this._bucket.append(key, fragment, options, callback); | ||
}; | ||
get viewTimeout() { return me(this).viewTimeout; } | ||
set viewTimeout(val) { me(this).viewTimeout = val; } | ||
Bucket.prototype.appendAsync = function(key, fragment, options) { | ||
return promisify(this.append, key, fragment, options); | ||
}; | ||
append(key, fragment, options, callback) { | ||
return me(this).append(key, fragment, options, callback); | ||
} | ||
Bucket.prototype.counter = function(key, delta, options, callback) { | ||
return this._bucket.counter(key, delta, options, callback); | ||
}; | ||
appendAsync(key, fragment, options) { | ||
return promisify.call(this, this.append, key, fragment, options); | ||
} | ||
Bucket.prototype.counterAsync = function(key, delta, options) { | ||
return promisify(this.counter, key, delta, options); | ||
}; | ||
counter(key, delta, options, callback) { | ||
return me(this).counter(key, delta, options, callback); | ||
} | ||
Bucket.prototype.disconnect = function() { | ||
this._bucket.disconnect(); | ||
}; | ||
counterAsync(key, delta, options) { | ||
return promisify.call(this, this.counter, key, delta, options); | ||
} | ||
Bucket.prototype.enableN1ql = function(hosts) { | ||
this._bucket.enableN1ql(hosts); | ||
}; | ||
disconnect() { | ||
me(this).disconnect(); | ||
} | ||
Bucket.prototype.get = function(key, options, callback) { | ||
return this._bucket.get(key, options, callback); | ||
}; | ||
enableN1ql(hosts) { | ||
me(this).enableN1ql(hosts); | ||
} | ||
Bucket.prototype.getAsync = function(key, options) { | ||
return promisify(this.get, key, options); | ||
}; | ||
get(key, options, callback) { | ||
return me(this).get(key, options, callback); | ||
} | ||
Bucket.prototype.getAndLock = function(key, options, callback) { | ||
return this._bucket.getAndLock(key, options, callback); | ||
}; | ||
getAsync(key, options) { | ||
return promisify.call(this, this.get, key, options); | ||
} | ||
Bucket.prototype.getAndLockAsync = function(key, options) { | ||
return promisify(this.getAndLock, key, options); | ||
}; | ||
getAndLock(key, options, callback) { | ||
return me(this).getAndLock(key, options, callback); | ||
} | ||
Bucket.prototype.getAndTouch = function(key, expiry, options, callback) { | ||
return this._bucket.getAndTouch(key, expiry, options, callback); | ||
}; | ||
getAndLockAsync(key, options) { | ||
return promisify.call(this, this.getAndLock, key, options); | ||
} | ||
Bucket.prototype.getAndTouchAsync = function(key, expiry, options) { | ||
return promisify(this.getAndTouch, key, expiry, options); | ||
}; | ||
getAndTouch(key, expiry, options, callback) { | ||
return me(this).getAndTouch(key, expiry, options, callback); | ||
} | ||
Bucket.prototype.getMulti = function(keys, callback) { | ||
return this._bucket.getMulti(keys, callback); | ||
}; | ||
getAndTouchAsync(key, expiry, options) { | ||
return promisify.call(this, this.getAndTouch, key, expiry, options); | ||
} | ||
Bucket.prototype.getMultiAsync = function(keys) { | ||
return promisify(this.getMulti, keys); | ||
}; | ||
getMulti(keys, callback) { | ||
return me(this).getMulti(keys, callback); | ||
} | ||
Bucket.prototype.getReplica = function(key, options, callback) { | ||
return this._bucket.getReplica(key, options, callback); | ||
}; | ||
getMultiAsync(keys) { | ||
return promisify.call(this, this.getMulti, keys); | ||
} | ||
Bucket.prototype.getReplicaAsync = function(key, options) { | ||
return promisify(this.getReplica, key, options); | ||
}; | ||
getReplica(key, options, callback) { | ||
return me(this).getReplica(key, options, callback); | ||
} | ||
Bucket.prototype.insert = function(key, value, options, callback) { | ||
return this._bucket.insert(key, value, options, callback); | ||
}; | ||
getReplicaAsync(key, options) { | ||
return promisify.call(this, this.getReplica, key, options); | ||
} | ||
Bucket.prototype.insertAsync = function(key, value, options) { | ||
return promisify(this.insert, key, value, options); | ||
}; | ||
insert(key, value, options, callback) { | ||
return me(this).insert(key, value, options, callback); | ||
} | ||
Bucket.prototype.manager = function() { | ||
return new BucketManager(this._bucket.manager()); | ||
}; | ||
insertAsync(key, value, options) { | ||
return promisify.call(this, this.insert, key, value, options); | ||
} | ||
Bucket.prototype.prepend = function(key, fragment, options, callback) { | ||
return this._bucket.prepend(key, fragment, options, callback); | ||
}; | ||
lookupIn(key, options) { | ||
return new LookupInBuilder(me(this).lookupIn(key, options)); | ||
} | ||
Bucket.prototype.prependAsync = function(key, fragment, options) { | ||
return promisify(this.prepend, key, fragment, options); | ||
}; | ||
manager() { | ||
return new BucketManager(me(this).manager()); | ||
} | ||
Bucket.prototype.query = function(query, params, callback) { | ||
return this._bucket.query(query, params, callback); | ||
}; | ||
mutateIn(key, options) { | ||
const mut = me(this).mutateIn(key, options); | ||
return new MutateInBuilder(mut); | ||
} | ||
Bucket.prototype.queryAsync = function(query, params) { | ||
return promisify(this.query, query, params); | ||
}; | ||
prepend(key, fragment, options, callback) { | ||
return me(this).prepend(key, fragment, options, callback); | ||
} | ||
Bucket.prototype.remove = function(key, options, callback) { | ||
return this._bucket.remove(key, options, callback); | ||
}; | ||
prependAsync(key, fragment, options) { | ||
return promisify.call(this, this.prepend, key, fragment, options); | ||
} | ||
Bucket.prototype.removeAsync = function(key, options) { | ||
return promisify(this.remove, key, options); | ||
}; | ||
query(query, params, callback) { | ||
return me(this).query(query, params, callback); | ||
} | ||
Bucket.prototype.replace = function(key, value, options, callback) { | ||
return this._bucket.replace(key, value, options, callback); | ||
}; | ||
queryAsync(query, params) { | ||
return promisify.call(this, this.query, query, params); | ||
} | ||
Bucket.prototype.replaceAsync = function(key, value, options) { | ||
return promisify(this.replace, key, value, options); | ||
}; | ||
remove(key, options, callback) { | ||
return me(this).remove(key, options, callback); | ||
} | ||
Bucket.prototype.setTranscoder = function(encoder, decoder) { | ||
this._bucket.setTranscoder(encoder, decoder); | ||
}; | ||
removeAsync(key, options) { | ||
return promisify.call(this, this.remove, key, options); | ||
} | ||
Bucket.prototype.touch = function(key, expiry, options, callback) { | ||
return this._bucket.touch(key, expiry, options, callback); | ||
}; | ||
replace(key, value, options, callback) { | ||
return me(this).replace(key, value, options, callback); | ||
} | ||
Bucket.prototype.touchAsync = function(key, expiry, options) { | ||
return promisify(this.touch, key, expiry, options); | ||
}; | ||
replaceAsync(key, value, options) { | ||
return promisify.call(this, this.replace, key, value, options); | ||
} | ||
Bucket.prototype.unlock = function(key, cas, options, callback) { | ||
return this._bucket.unlock(key, cas, options, callback); | ||
}; | ||
setTranscoder(encoder, decoder) { | ||
me(this).setTranscoder(encoder, decoder); | ||
} | ||
Bucket.prototype.unlockAsync = function(key, cas, options) { | ||
return promisify(this.unlock, key, cas, options); | ||
}; | ||
touch(key, expiry, options, callback) { | ||
return me(this).touch(key, expiry, options, callback); | ||
} | ||
Bucket.prototype.upsert = function(key, value, options, callback) { | ||
return this._bucket.upsert(key, value, options, callback); | ||
}; | ||
touchAsync(key, expiry, options) { | ||
return promisify.call(this, this.touch, key, expiry, options); | ||
} | ||
Bucket.prototype.upsertAsync = function(key, value, options) { | ||
return promisify(this.upsert, key, value, options); | ||
}; | ||
unlock(key, cas, options, callback) { | ||
return me(this).unlock(key, cas, options, callback); | ||
} | ||
unlockAsync(key, cas, options) { | ||
return promisify.call(this, this.unlock, key, cas, options); | ||
} | ||
upsert(key, value, options, callback) { | ||
return me(this).upsert(key, value, options, callback); | ||
} | ||
upsertAsync(key, value, options) { | ||
return promisify.call(this, this.upsert, key, value, options); | ||
} | ||
} | ||
module.exports = Bucket; |
'use strict'; | ||
var promisify = require('./promisify'); | ||
const promisify = require('./promisify'); | ||
function BucketManager(bucketmgr) { | ||
if (!bucketmgr) throw 'No bucket manager was provided.'; | ||
this._bucketmgr = bucketmgr; | ||
} | ||
const state = new WeakMap(); | ||
const me = (instance) => { return state.get(instance); }; | ||
BucketManager.prototype.flush = function(callback) { | ||
return this._bucketmgr.flush(callback); | ||
}; | ||
class BucketManager { | ||
constructor(bucketmgr) { | ||
if (!bucketmgr) | ||
throw new Error('No bucket manager was provided.'); | ||
state.set(this, bucketmgr); | ||
} | ||
BucketManager.prototype.flushAsync = function() { | ||
return promisify(this.flush); | ||
}; | ||
flush(callback) { | ||
return me(this).flush(callback); | ||
} | ||
BucketManager.prototype.getDesignDocument = function(name, callback) { | ||
return this._bucketmgr.getDesignDocument(name, callback); | ||
}; | ||
flushAsync() { | ||
return promisify.call(this, this.flush); | ||
} | ||
BucketManager.prototype.getDesignDocumentAsync = function(name) { | ||
return promisify(this.getDesignDocument, name); | ||
}; | ||
getDesignDocument(name, callback) { | ||
return me(this).getDesignDocument(name, callback); | ||
} | ||
BucketManager.prototype.getDesignDocuments = function(callback) { | ||
return this._bucketmgr.getDesignDocuments(callback); | ||
}; | ||
getDesignDocumentAsync(name) { | ||
return promisify.call(this, this.getDesignDocument, name); | ||
} | ||
BucketManager.prototype.getDesignDocumentsAsync = function() { | ||
return promisify(this.getDesignDocuments); | ||
}; | ||
getDesignDocuments(callback) { | ||
return me(this).getDesignDocuments(callback); | ||
} | ||
BucketManager.prototype.insertDesignDocument = function(name, data, callback) { | ||
return this._bucketmgr.insertDesignDocument(name, data, callback); | ||
}; | ||
getDesignDocumentsAsync() { | ||
return promisify.call(this, this.getDesignDocuments); | ||
} | ||
BucketManager.prototype.insertDesignDocumentAsync = function(name, data) { | ||
return promisify(this.insertDesignDocument, name, data); | ||
}; | ||
insertDesignDocument(name, data, callback) { | ||
return me(this).insertDesignDocument(name, data, callback); | ||
} | ||
BucketManager.prototype.removeDesignDocument = function(name, callback) { | ||
return this._bucketmgr.removeDesignDocument(name, callback); | ||
}; | ||
insertDesignDocumentAsync(name, data) { | ||
return promisify.call(this, this.insertDesignDocument, name, data); | ||
} | ||
BucketManager.prototype.removeDesignDocumentAsync = function(name) { | ||
return promisify(this.removeDesignDocument, name); | ||
}; | ||
removeDesignDocument(name, callback) { | ||
return me(this).removeDesignDocument(name, callback); | ||
} | ||
BucketManager.prototype.upsertDesignDocument = function(name, data, callback) { | ||
return this._bucketmgr.upsertDesignDocument(name, data, callback); | ||
}; | ||
removeDesignDocumentAsync(name) { | ||
return promisify.call(this, this.removeDesignDocument, name); | ||
} | ||
BucketManager.prototype.upsertDesignDocumentAsync = function(name, data) { | ||
return promisify(this.upsertDesignDocument, name, data); | ||
}; | ||
upsertDesignDocument(name, data, callback) { | ||
return me(this).upsertDesignDocument(name, data, callback); | ||
} | ||
upsertDesignDocumentAsync(name, data) { | ||
return promisify.call(this, this.upsertDesignDocument, name, data); | ||
} | ||
} | ||
module.exports = BucketManager; |
'use strict'; | ||
var couchbase = require('couchbase'); | ||
const couchbase = require('couchbase'); | ||
var Bucket = require('./bucket'); | ||
var ClusterManager = require('./clustermgr'); | ||
var promisify = require('./promisify'); | ||
const Bucket = require('./bucket'); | ||
const ClusterManager = require('./clustermgr'); | ||
const promisify = require('./promisify'); | ||
function Cluster(cnstr, options) { | ||
this._cluster = new couchbase.Cluster(cnstr, options); | ||
} | ||
const state = new WeakMap(); | ||
const me = (instance) => { return state.get(instance); }; | ||
Cluster.prototype.manager = function(username, password) { | ||
return new ClusterManager(this._cluster.manager(username, password)); | ||
}; | ||
class Cluster { | ||
constructor(cnstr, options) { | ||
state.set(this, new couchbase.Cluster(cnstr, options)); | ||
} | ||
Cluster.prototype.openBucket = function(name, password, callback) { | ||
return new Bucket(this._cluster.openBucket(name, password, callback)); | ||
}; | ||
manager(username, password) { | ||
return new ClusterManager(me(this).manager(username, password)); | ||
} | ||
Cluster.prototype.openBucketAsync = function(name, password) { | ||
return promisify(this.openBucket, name, password); | ||
}; | ||
openBucket(name, password, callback) { | ||
return new Bucket(me(this).openBucket(name, password, callback)); | ||
} | ||
openBucketAsync(name, password) { | ||
return promisify.call(this, this.openBucket, name, password); | ||
} | ||
} | ||
module.exports = Cluster; |
'use strict'; | ||
var promisify = require('./promisify'); | ||
const promisify = require('./promisify'); | ||
function ClusterManager(clustermgr) { | ||
if (!clustermgr) throw 'No cluster manager was provided.'; | ||
this._clustermgr = clustermgr; | ||
} | ||
const state = new WeakMap(); | ||
const me = (instance) => { return state.get(instance); }; | ||
ClusterManager.prototype.createBucket = function(name, opts, callback) { | ||
return this._clustermgr.createBucket(name, opts, callback); | ||
}; | ||
class ClusterManager { | ||
constructor(clustermgr) { | ||
if (!clustermgr) | ||
throw new Error('No cluster manager was provided.'); | ||
state.set(this, clustermgr); | ||
} | ||
ClusterManager.prototype.createBucketAsync = function(name, opts) { | ||
return promisify(this.createBucket, name, opts); | ||
}; | ||
createBucket(name, opts, callback) { | ||
return me(this).createBucket(name, opts, callback); | ||
} | ||
ClusterManager.prototype.listBuckets = function(callback) { | ||
return this._clustermgr.listBuckets(callback); | ||
}; | ||
createBucketAsync(name, opts) { | ||
return promisify.call(this, this.createBucket, name, opts); | ||
} | ||
ClusterManager.prototype.listBucketsAsync = function() { | ||
return promisify(this.listBuckets); | ||
}; | ||
listBuckets(callback) { | ||
return me(this).listBuckets(callback); | ||
} | ||
ClusterManager.prototype.removeBucket = function(name, callback) { | ||
return this._clustermgr.removeBucket(name, callback); | ||
}; | ||
listBucketsAsync() { | ||
return promisify.call(this, this.listBuckets); | ||
} | ||
ClusterManager.prototype.removeBucketAsync = function(name) { | ||
return promisify(this.removeBucket, name); | ||
}; | ||
removeBucket(name, callback) { | ||
return me(this).removeBucket(name, callback); | ||
} | ||
removeBucketAsync(name) { | ||
return promisify.call(this, this.removeBucket, name); | ||
} | ||
} | ||
module.exports = ClusterManager; |
'use strict'; | ||
var couchbase = require('couchbase'); | ||
const couchbase = require('couchbase'); | ||
module.exports = { | ||
Cluster: require('./cluster'), | ||
N1qlQuery: couchbase.N1qlQuery, | ||
SpatialQuery: couchbase.SpatialQuery, | ||
ViewQuery: couchbase.ViewQuery, | ||
N1qlQuery: couchbase.N1qlQuery, | ||
Mock: { | ||
@@ -11,0 +11,0 @@ Cluster: require('./mock-cluster'), |
'use strict'; | ||
var couchbase = require('couchbase'); | ||
const couchbase = require('couchbase'); | ||
var Bucket = require('./bucket'); | ||
var ClusterManager = require('./clustermgr'); | ||
var promisify = require('./promisify'); | ||
const Bucket = require('./bucket'); | ||
const ClusterManager = require('./clustermgr'); | ||
const promisify = require('./promisify'); | ||
function MockCluster(cnstr) { | ||
this._cluster = new couchbase.Mock.Cluster(cnstr); | ||
} | ||
const state = new WeakMap(); | ||
const me = (instance) => { return state.get(instance); }; | ||
MockCluster.prototype.manager = function(username, password) { | ||
return new ClusterManager(this._cluster.manager(username, password)); | ||
}; | ||
class MockCluster { | ||
constructor(cnstr) { | ||
state.set(this, new couchbase.Mock.Cluster(cnstr)); | ||
} | ||
MockCluster.prototype.openBucket = function(name, password, callback) { | ||
return new Bucket(this._cluster.openBucket(name, password, callback)); | ||
}; | ||
manager(username, password) { | ||
return new ClusterManager(me(this).manager(username, password)); | ||
} | ||
MockCluster.prototype.openBucketAsync = function(name, password) { | ||
return promisify(this.openBucket, name, password); | ||
}; | ||
openBucket(name, password, callback) { | ||
return new Bucket(me(this).openBucket(name, password, callback)); | ||
} | ||
openBucketAsync(name, password) { | ||
return promisify.call(this, this.openBucket, name, password); | ||
} | ||
} | ||
module.exports = MockCluster; |
'use strict'; | ||
var Promise = require('bluebird'); | ||
const Promise = require('bluebird'); | ||
module.exports = function(original) { | ||
var method = original; | ||
var args = new Array(arguments.length - 1); | ||
for (var i = 0; i < arguments.length; i++) { | ||
const method = original; | ||
let args = new Array(arguments.length - 1); | ||
for (let i = 0; i < arguments.length; i++) { | ||
args[i] = arguments[i]; | ||
} | ||
var self = this; | ||
return new Promise(function(fulfill, reject) { | ||
var ff = fulfill; | ||
var rej = reject; | ||
args.push(function(err, result) { | ||
const self = this; | ||
return new Promise((fulfill, reject) => { | ||
const ff = fulfill; | ||
const rej = reject; | ||
args.push((err, result) => { | ||
if (err) rej(err); else ff(result); | ||
@@ -17,0 +17,0 @@ return result; |
@@ -5,17 +5,17 @@ { | ||
"description": "An A+ Promises wrapper for the Couchbase SDK.", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"dependencies": { | ||
"bluebird": "^3.0.5", | ||
"couchbase": "^2.1.2" | ||
"bluebird": "~3.3.5", | ||
"couchbase": "~2.1.5" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.4.1", | ||
"gulp": "^3.9.0", | ||
"gulp-eslint": "^1.1.0", | ||
"gulp-istanbul": "^0.10.2", | ||
"chai": "^3.5.0", | ||
"gulp": "^3.9.1", | ||
"gulp-eslint": "^2.0.0", | ||
"gulp-istanbul": "^0.10.4", | ||
"gulp-jsvalidate": "^2.1.0", | ||
"gulp-mocha": "^2.2.0", | ||
"istanbul": "^0.4.0", | ||
"mocha": "^2.3.3" | ||
"mocha": "^2.4.5" | ||
}, | ||
@@ -31,2 +31,5 @@ "keywords": [ | ||
"main": "./lib/couchbase", | ||
"peerDependencies": { | ||
"couchbase": "2.1.x" | ||
}, | ||
"private": false, | ||
@@ -33,0 +36,0 @@ "repository": { |
@@ -10,3 +10,3 @@ # Couchbase Promises | ||
Promises are created using the [Bluebird](http://bluebirdjs.com/docs/getting-started.html) Promises library. If you absolutely must use native ECMAScript Promises, then have a look at [couchbase-es-promises](https://www.npmjs.com/package/couchbase-promises). I _highly_ recommend avoiding couchbase-es-promises, as Bluebird is compatible with native promises, and offers [an order of magnitude more performance](https://github.com/petkaantonov/bluebird/tree/master/benchmark). | ||
Promises are created using the [Bluebird](http://bluebirdjs.com/docs/getting-started.html) Promises library. If you absolutely must use native ECMAScript Promises, then have a look at [couchbase-es-promises](https://www.npmjs.com/package/couchbase-es-promises). I _highly_ recommend avoiding couchbase-es-promises, as Bluebird is compatible with native promises, and offers [an order of magnitude more performance](https://github.com/petkaantonov/bluebird/tree/master/benchmark). | ||
@@ -19,5 +19,5 @@ ## General Usage | ||
```js | ||
let couchbase = require('couchbase-promises'); | ||
let cluster = new couchbase.Cluster('couchbase://127.0.0.1'); | ||
let bucket = cluster.openBucket(); | ||
const couchbase = require('couchbase-promises'); | ||
const cluster = new couchbase.Cluster('couchbase://127.0.0.1'); | ||
const bucket = cluster.openBucket(); | ||
@@ -24,0 +24,0 @@ function UserNotFoundError() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
50525
25
789
3
+ Addedabbrev@1.1.1(transitive)
+ Addedafter@0.8.2(transitive)
+ Addedansi@0.3.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedarray-index@1.0.0(transitive)
+ Addedassert-plus@0.2.0(transitive)
+ Addedasync@1.5.22.6.4(transitive)
+ Addedaws-sign2@0.6.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbindings@1.2.1(transitive)
+ Addedbl@1.1.21.2.33.0.1(transitive)
+ Addedblock-stream@0.0.9(transitive)
+ Addedbluebird@3.3.5(transitive)
+ Addedboom@2.10.1(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbuffer-alloc@1.2.0(transitive)
+ Addedbuffer-alloc-unsafe@1.1.0(transitive)
+ Addedbuffer-fill@1.0.0(transitive)
+ Addedbuffer-from@0.1.2(transitive)
+ Addedcaseless@0.11.0(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcouchbase@2.1.8(transitive)
+ Addedcryptiles@2.0.5(transitive)
+ Addedd@1.0.2(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedduplexer2@0.0.2(transitive)
+ Addedes5-ext@0.10.64(transitive)
+ Addedes6-iterator@2.0.3(transitive)
+ Addedes6-symbol@3.1.4(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesniff@2.0.1(transitive)
+ Addedevent-emitter@0.3.5(transitive)
+ Addedexpand-template@1.1.1(transitive)
+ Addedext@1.7.0(transitive)
+ Addedform-data@1.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfstream@1.0.12(transitive)
+ Addedgauge@1.2.7(transitive)
+ Addedgenerate-function@2.3.1(transitive)
+ Addedgenerate-object-property@1.2.0(transitive)
+ Addedghreleases@1.0.7(transitive)
+ Addedghrepos@2.1.0(transitive)
+ Addedghutils@3.2.6(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhar-validator@2.0.6(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhawk@3.1.3(transitive)
+ Addedhoek@2.16.3(transitive)
+ Addedhttp-signature@1.1.1(transitive)
+ Addedhyperquest@2.1.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedis-my-ip-valid@1.0.1(transitive)
+ Addedis-my-json-valid@2.20.6(transitive)
+ Addedis-property@1.0.2(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjsonist@2.1.2(transitive)
+ Addedjsonpointer@5.0.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlodash.pad@4.5.1(transitive)
+ Addedlodash.padend@4.6.1(transitive)
+ Addedlodash.padstart@4.6.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addednan@2.3.5(transitive)
+ Addednext-tick@1.1.0(transitive)
+ Addednode-gyp@3.8.0(transitive)
+ Addednode-ninja@1.0.2(transitive)
+ Addednode-uuid@1.4.8(transitive)
+ Addednopt@3.0.6(transitive)
+ Addednpmlog@2.0.4(transitive)
+ Addedoauth-sign@0.8.2(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedosenv@0.1.5(transitive)
+ Addedpath-array@1.0.1(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedprebuild@4.1.2(transitive)
+ Addedprocess-nextick-args@1.0.7(transitive)
+ Addedpump@1.0.3(transitive)
+ Addedqs@6.1.2(transitive)
+ Addedreadable-stream@1.0.341.1.142.0.6(transitive)
+ Addedrequest@2.72.0(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsemver@5.3.0(transitive)
+ Addedsimple-get@1.4.3(transitive)
+ Addedsimple-mime@0.1.0(transitive)
+ Addedsntp@1.0.9(transitive)
+ Addedstring_decoder@0.10.311.3.0(transitive)
+ Addedstringstream@0.0.6(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedtar@2.2.2(transitive)
+ Addedtar-fs@1.16.4(transitive)
+ Addedtar-stream@1.6.2(transitive)
+ Addedthrough2@0.6.5(transitive)
+ Addedto-buffer@1.1.1(transitive)
+ Addedtough-cookie@2.2.2(transitive)
+ Addedtunnel-agent@0.4.3(transitive)
+ Addedtype@2.7.3(transitive)
+ Addedunzip-response@1.0.2(transitive)
+ Addedurl-template@2.0.8(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedxtend@4.0.2(transitive)
- Removed@colors/colors@1.6.0(transitive)
- Removed@dabh/diagnostics@2.0.3(transitive)
- Removed@types/triple-beam@1.3.5(transitive)
- Removedaproba@1.2.0(transitive)
- Removedasync@3.2.6(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbindings@1.5.0(transitive)
- Removedbl@4.1.0(transitive)
- Removedbluebird@3.7.2(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedcolor@3.2.1(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcolor-string@1.9.1(transitive)
- Removedcolorspace@1.1.4(transitive)
- Removedconsole-control-strings@1.1.0(transitive)
- Removedcouchbase@2.6.12(transitive)
- Removeddecompress-response@4.2.1(transitive)
- Removeddetect-libc@1.0.3(transitive)
- Removeddev-null@0.1.1(transitive)
- Removedenabled@2.0.0(transitive)
- Removedexpand-template@2.0.3(transitive)
- Removedfecha@4.2.3(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedfn.name@1.1.0(transitive)
- Removedgauge@2.7.4(transitive)
- Removedieee754@1.2.1(transitive)
- Removedis-arrayish@0.3.2(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedis-stream@2.0.1(transitive)
- Removedkuler@2.0.0(transitive)
- Removedlogform@2.7.0(transitive)
- Removedmimic-response@2.1.0(transitive)
- Removedmkdirp-classic@0.5.3(transitive)
- Removedms@2.1.3(transitive)
- Removednan@2.22.0(transitive)
- Removednapi-build-utils@1.0.2(transitive)
- Removednode-abi@2.30.1(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedone-time@1.0.0(transitive)
- Removedprebuild-install@5.3.6(transitive)
- Removedpump@3.0.2(transitive)
- Removedsafe-stable-stringify@2.5.0(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedsimple-concat@1.0.1(transitive)
- Removedsimple-get@3.1.1(transitive)
- Removedsimple-swizzle@0.2.2(transitive)
- Removedstack-trace@0.0.10(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedtar-fs@2.1.2(transitive)
- Removedtar-stream@2.2.0(transitive)
- Removedtext-hex@1.0.0(transitive)
- Removedtriple-beam@1.4.1(transitive)
- Removedwhich-pm-runs@1.1.0(transitive)
- Removedwide-align@1.1.5(transitive)
- Removedwinston@3.17.0(transitive)
- Removedwinston-transport@4.9.0(transitive)
Updatedbluebird@~3.3.5
Updatedcouchbase@~2.1.5