couchbase-promises
Advanced tools
Comparing version 1.0.0 to 1.0.1
# Change Log | ||
## 1.0.0 | ||
## 1.0 | ||
### 1.0.1 | ||
* Fixing a leak of the `arguments` object to avoid optimizing compiler bailouts. | ||
### 1.0.0 | ||
* Initial release. |
@@ -7,3 +7,6 @@ 'use strict'; | ||
var method = original; | ||
var args = [].slice.call(arguments); | ||
var args = new Array(arguments.length - 1); | ||
for (var i = 0; i < arguments.length; i++) { | ||
args[i] = arguments[i]; | ||
} | ||
var self = this; | ||
@@ -10,0 +13,0 @@ return new Promise(function(fulfill, reject) { |
@@ -5,3 +5,3 @@ { | ||
"description": "An A+ Promises wrapper for the Couchbase SDK.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
@@ -8,0 +8,0 @@ "dependencies": { |
# Couchbase Promises | ||
A lightweight, drop-in replacement for the Couchnode module with added support for A+ Promises. | ||
@@ -7,7 +6,7 @@ [![Build Status](https://secure.travis-ci.org/dsfields/couchbase-promises.svg)](https://travis-ci.org/dsfields/couchbase-promises) | ||
## Overview | ||
Just like the [Couchbase Node.js module](http://developer.couchbase.com/documentation/server/4.0/sdks/node-2.0/introduction.html), but with the addition of `*Async()` methods that return A+ Promises for all methods that contain a Node.js callback parameter. Both the normal Couchnode and the mock Couchnode APIs have been fully promisified. | ||
Just like the [Couchbase Node.js SDK](http://developer.couchbase.com/documentation/server/4.0/sdks/node-2.0/introduction.html), but with the addition of `*Async()` methods that return A+ Promises for all methods that contain a Node.js callback parameter. Both the normal Couchnode and the mock Couchnode APIs have been fully promisified. This module functions as a drop-in replacement for the [couchbase](https://www.npmjs.com/package/couchbase) module. | ||
The current version supports Couchbase Node.js SDK version 2.1.2. | ||
Promises are created using the [Bluebird](http://bluebirdjs.com/docs/getting-started.html) Promises library. | ||
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). | ||
@@ -20,5 +19,5 @@ ## General Usage | ||
```js | ||
var couchbase = require('couchbase-promises'); | ||
var cluster = new couchbase.Cluster('couchbase://127.0.0.1'); | ||
var bucket = cluster.openBucket(); | ||
let couchbase = require('couchbase-promises'); | ||
let cluster = new couchbase.Cluster('couchbase://127.0.0.1'); | ||
let bucket = cluster.openBucket(); | ||
@@ -43,3 +42,3 @@ function UserNotFoundError() { | ||
}).catch(couchbase.Error, function(e) { | ||
if (e.code == couchbase.errors.keyNotFound) | ||
if (e.code === couchbase.errors.keyNotFound) | ||
throw new UserNotFoundError(); | ||
@@ -46,0 +45,0 @@ |
Sorry, the diff of this file is not supported yet
48695
688
48