{"id":15917620,"url":"https://github.com/dsfields/couchbase-promises","last_synced_at":"2026-03-13T23:03:00.149Z","repository":{"id":57156943,"uuid":"46146952","full_name":"dsfields/couchbase-promises","owner":"dsfields","description":"A drop-in replacement for the native Couchbase module with added support for A+ Promises.","archived":false,"fork":false,"pushed_at":"2018-11-30T20:48:31.000Z","size":106,"stargazers_count":17,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T03:46:27.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsfields.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-13T20:59:39.000Z","updated_at":"2019-07-06T02:47:04.000Z","dependencies_parsed_at":"2022-09-03T16:51:06.123Z","dependency_job_id":null,"html_url":"https://github.com/dsfields/couchbase-promises","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dsfields/couchbase-promises","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsfields%2Fcouchbase-promises","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsfields%2Fcouchbase-promises/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsfields%2Fcouchbase-promises/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsfields%2Fcouchbase-promises/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsfields","download_url":"https://codeload.github.com/dsfields/couchbase-promises/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsfields%2Fcouchbase-promises/sbom","scorecard":{"id":357637,"data":{"date":"2025-08-11","repo":{"name":"github.com/dsfields/couchbase-promises","commit":"20a137d6aeac1febfb926e97f360ec48840b30e5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 3/13 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T10:01:38.463Z","repository_id":57156943,"created_at":"2025-08-18T10:01:38.467Z","updated_at":"2025-08-18T10:01:38.467Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273077227,"owners_count":25041358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T18:11:55.570Z","updated_at":"2026-03-13T23:03:00.065Z","avatar_url":"https://github.com/dsfields.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# couchbase-promises\r\n\r\n[![Build Status](https://secure.travis-ci.org/dsfields/couchbase-promises.svg)](https://travis-ci.org/dsfields/couchbase-promises)\r\n\r\n[![Dependency Status](https://img.shields.io/david/bentonam/couchbase-promises.svg?maxAge=2592000\u0026style=flat-square)](https://david-dm.org/dsfields/couchbase-promises)\r\n\r\n[![devDependency Status](https://img.shields.io/david/dev/dsfields/couchbase-promises.svg?maxAge=2592000\u0026style=flat-square)](https://david-dm.org/dsfields/couchbase-promises#info=devDependencies)\r\n\r\n__Contents__\r\n\r\n  * [Overview](#overview)\r\n  * [Usage](#usage)\r\n  * [API](#api)\r\n    + [Module: `couchbase`](#couchbase)\r\n    + [Class: `Bucket`](#class-bucket)\r\n    + [Class: `Summary`](#class-summary)\r\n    + [Multi-operations](#multi-operations)\r\n    + [Promises](#promises)\r\n\r\n## Overview\r\n\r\nJust like the [Couchbase Node.js SDK](http://developer.couchbase.com/documentation/server/4.5/sdk/nodejs/start-using-sdk.html), but with the addition of `*Async()` methods that return A+ Promises for all methods that contain a Node.js callback parameter.  This module functions as a drop-in replacement for the [couchbase](https://www.npmjs.com/package/couchbase) module.\r\n\r\nAdditionally, this library provides enhanced support for bulk operations.  The the native `couchbase` module only provides batch operation support for key lookups (via [`Bucket.prototype.getMulti()`](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#getMulti)).  The `couchbase-promises` module provides a extra methods on the `Bucket` class for performing batch operations.  See the [API](#api) documentation for more information.\r\n\r\nThe current version supports Couchbase Node.js SDK version 2.3.0.\r\n\r\n## Usage\r\nUsage is almost exactly the same as the native SDK, but with the added ability to use Promises instead of callbacks.\r\n\r\nA user repository module with a simple lookup...\r\n\r\n```js\r\nconst couchbase = require('couchbase-promises');\r\nconst cluster = new couchbase.Cluster('couchbase://127.0.0.1');\r\nconst bucket = cluster.openBucket();\r\n\r\nfunction UserNotFoundError() {\r\n  Error.call(this);\r\n  Error.captureStackTrace(this, UserNotFoundError);\r\n  this.message = \"User not found.\";\r\n}\r\nUserNotFoundError.prototype = Object.create(Error.prototype);\r\nUserNotFoundError.prototype.constructor = UserNotFoundError;\r\n\r\nexports = {\r\n  UserNotFoundError: UserNotFoundError,\r\n  getUserAsync: function(userId) {\r\n    return bucket.getAsync(userId)\r\n      .then(function(result) {\r\n        return {\r\n          user: result.value,\r\n          meta: {\r\n            etag: result.cas\r\n          }\r\n        };\r\n      })\r\n      .catch(couchbase.Error, function(e) {\r\n        if (e.code === couchbase.errors.keyNotFound)\r\n          throw new UserNotFoundError();\r\n\r\n        throw e;\r\n      });\r\n  }\r\n};\r\n```\r\n\r\n## API\r\n\r\nYou use the `couchbase-promises` module much in the same way you use the native `couchbase` module.  The full documentation for the native module can be found at:\r\n\r\n[http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/)\r\n\r\nIn addition to the added `*Async()` methods, the `couchbase-promises` module includes the following added pieces of functionality.\r\n\r\n### Module: `couchbase`\r\n\r\n  * `couchbase.Promise`: gets a reference to the constructor used to create `Promise` instances in `*Async()` methods.\r\n\r\n  * `couchbase.setPromiseLib(lib)`: sets promise library used used by `*Async()` methods.  This method globally effects all `Cluster` and `Bucket` instances, and can be called at any time.\r\n\r\n  * `couchbase.reverPromiseLib()`: reverts this promise library to the default ([bluebird](https://www.npmjs.com/package/bluebird)).  This method globally effects all `Cluster` and `Bucket` instances, and can be called at any time.\r\n\r\n### Class: `Bucket`\r\n\r\n  * `Bucket.prototype.appendMultiAsync(docs, options)`:\r\n    Appends a value for each given key.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `docs`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `fragment`: _(required)_ the value to append.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for append](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#append).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.counterMultiAsync(docs [, defaultOptions])`:\r\n    Increments counter entries for each key.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `docs`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `delta`: _(required)_ the value to append.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for counter](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#counter).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.getAndLockMultiAsync(keys [, defaultOptions])`:\r\n    Gets the document for each key, and adds an exclusive lock for each entry.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array or `Set` of keys you wish to get and lock.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n          - `options`: _(optional)_ object that contains the [options used for getAndLock](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#getAndLock).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.getAndTouchMultiAsync(docs [, defaultOptions])`:\r\n    Gets the document for each key, sets their TTL value.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `docs`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `expiry`: _(required)_ the TTL duration in seconds.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for getAndTouch](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#getAndTouch).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.getMultiAsync(keys [, options])`:\r\n    Gets multiple documents given an array of keys.  The `getMulti()` method is the only batch operation supported by the native `couchbase` module.\r\n\r\n    Returns a `Promise`.  This `Promise` will only reject in the event of a catastrophic failure.  Errors for individual keys will not result in a rejection.  The `Promise` will resolve with an object that looks similar to the `Summary` object, and contains the following keys:\r\n\r\n      + `hasErrors`: a `Boolean` value indicating whether or not key failed.\r\n\r\n      + `errors`: an integer representing the number of failed keys.\r\n\r\n      + `results`: the raw results object from the native `getMulti()` method.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array of strings to lookup.\r\n\r\n      + `options`: _(optional)_ an object with the following keys:\r\n\r\n        - `batch_size`: _(optional)_ a number that indicates the size of each batch that is used to fetch the specified keys. A batch size of `0` indicates to perform all operations simultaneously.  The default is `0`.\r\n\r\n  * `Bucket.prototype.getReplicaMultiAsync(keys [, defaultOptions])`:\r\n    Gets documents for the specified keys from replica nodes.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array or `Set` of keys you wish to get and lock.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n          - `options`: _(optional)_ object that contains the [options used for getReplica](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#getReplica).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.insertMultiAsync(docs [, defaultOptions])`:\r\n    Inserts multiple documents into the bucket.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `docs`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the value of the document.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for insert](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#insert).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.listAppendMultiAsync(keys [, defaultOptions])`:\r\n    Appends an item to each list entry.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the value to append.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for listAppend](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#listAppend).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.listGetMultiAsync(keys [, defaultOptions])`:\r\n    Gets multiple list entries.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `index`: _(required)_ the index of the item in the list to retrieve.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for listGet](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#listGet).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.listPrependMultiAsync(keys [, defaultOptions])`:\r\n    Prepends an item to each list.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the value to prepend.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for listPrepend](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#listPrepend).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.listRemoveMultiAsync(keys [, defaultOptions])`:\r\n    Removes an item from each list.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `index`: _(required)_ the index of the item to remove from the list.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for listRemove](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#listRemove).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.listSetMultiAsync(keys [, defaultOptions])`:\r\n    Sets an item at a specific index for each list.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `index`: _(required)_ the index of the list entry you are setting.\r\n\r\n        - `value`: _(required)_ the value to set in the list.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for listSet](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#listSet).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.listSizeMultiAsync(keys [, defaultOptions])`:\r\n    Gets the size of each list.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array or `Set` of keys for lists to which you want to get the size.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for listSize](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#listSize).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.mapAddMultiAsync(keys [, defaultOptions])`:\r\n    Adds an entry to each map.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `path`: _(required)_ the key within the map.\r\n\r\n        - `value`: _(required)_ the value to store in the map.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for mapAdd](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#mapAdd).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.mapGetMultiAsync(keys [, defaultOptions])`:\r\n    Gets a value from each map given a path.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `path`: _(required)_ the key within the map you wish to fetch.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for mapGet](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#mapGet).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.mapRemoveMultiAsync(keys [, defaultOptions])`:\r\n    Removes an item given a path for each map.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `path`: _(required)_ the key within the map you wish to remove.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for mapRemove](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#mapRemove).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.mapSizeMultiAsync(keys [, defaultOptions])`:\r\n    Gets the size of each map.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array or `Set` of keys for maps to which you want to get the size.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for mapSize](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#mapSize).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.prependMultiAsync(keys [, defaultOptions])`:\r\n    Prepends a value to each document.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `fragment`: _(required)_ the value to prepend.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for prepend](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#prepend).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.queuePopMultiAsync(keys [, defaultOptions])`:\r\n    Pops the next item off of each queue.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array or `Set` of keys for queues to which you want to get the size.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for queuePop](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#queuePop).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.queuePushMultiAsync(keys [, defaultOptions])`:\r\n    Pushes an item to the end of each queue.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the value to push to the queue.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for queuePush](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#queuePush).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.queueSizeMultiAsync(keys [, defaultOptions])`:\r\n    Gets the size of each queue.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array or `Set` of keys for queues to which you want to get the size.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for queueSize](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#queueSize).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.removeMultiAsync(keys [, defaultOptions])`:\r\n    Removes multiple documents in the bucket.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`:  _(required)_ an array or `Set` of keys you wish to remove.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for remove](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#remove).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.replaceMultiAsync(docs [, defaultOptions])`:\r\n    Replaces multiple documents in the bucket.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `docs`:  _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase you wish to replace.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the replacement value.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for replace](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#replace).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.setAddMultiAsync(keys [, defaultOptions])`:\r\n    Adds an item to each set.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the value to add o the set.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for setAdd](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#setAdd).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.setExistsMultiAsync(keys [, defaultOptions])`:\r\n    Determines whether or not an item exists in each set.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the value to which you are validating the existence.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for setExists](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#setExists).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.setRemoveMultiAsync(keys [, defaultOptions]s)`:\r\n    Removes an item from each set.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the value you wish to remove from the set.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for setRemove](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#setRemove).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.setSizeMultiAsync(keys [, defaultOptions])`:\r\n    Gets the size of each set.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ an array or `Set` of keys for sets to which you want to get the size.\r\n\r\n        Alternatively `keys` can be a `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for setSize](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#setSize).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.touchMultiAsync(keys [, defaultOptions])`:\r\n    Sets the TTL expiration for each document.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `expiry`: _(required)_ the TTL duration in seconds.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for touch](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#touch).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.unlockMultiAsync(keys [, defaultOptions])`:\r\n    Unlocks each document if the provided corresponding CAS values match the current.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `keys`: _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase.  Each value is an object with the following keys:\r\n\r\n        - `cas`: _(required)_ the CAS value that was returned when the value was locked.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for unlock](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#unlock).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n  * `Bucket.prototype.upsertMultiAsync(docs [, defaultOptions])`:\r\n    Upserts multiple documents to the bucket. This method will create individual upsert operations for each key using `Promisea.all()`.\r\n\r\n    Returns a `Promise` that resolves with a [`Summary`](#summary) object.  This `Promise` will always be fulfilled.  Any errors that occur will be specified in the resolved `Summary`.\r\n\r\n    Parameters include:\r\n\r\n      + `docs`:  _(required)_ object or `Map` where each key corresponds to the key used to store the document in Couchbase you wish to upsert.  Each value is an object with the following keys:\r\n\r\n        - `value`: _(required)_ the contents of the document to be upserted.\r\n\r\n        - `options`: _(optional)_ object that contains the [options used for upsert](http://docs.couchbase.com/sdk-api/couchbase-node-client-2.2.5/Bucket.html#upsert).  If this key is absent, options provided by `defaultOptions` will be used.  If you provide this key as part of a `docs` entry, but set it to `undefined` or `null` no options will be used on the insert, and regardless of whether or not `defaultOptions` was provided.\r\n\r\n      + `defaultOptions`: _(optional)_ default options for each operation.\r\n\r\n### Class: `Summary`\r\n\r\nContains a summary of a bulk operation.  Keys include:\r\n\r\n  * `hasErrors`: a Boolean value indicating whether or not any items failed in the bulk operation.\r\n  * `keys`: an array of keys that were used in the bulk operations.\r\n  * `results`: an object with properties for key used in the bulk operation.\r\n    + `success`: a Boolean value indicating whether or not the the individual operation succeeded.\r\n    + `err`: the error returned from Couchbase if the operation was not successful.\r\n    + `result`: the result object returned from Couchbase.\r\n\r\n### Multi-operations\r\n\r\nAll added multi-operations are executed with `Promise.all()`.  Thus, multiple individual requests to the Couchbase server made in parallel, as opposed to multiple operations being performed in a single request.\r\n\r\n### Promises\r\n\r\nBy default, `Promise` instances are created using the [Bluebird](http://bluebirdjs.com/docs/getting-started.html) promises library.  We prefer it over native promises and some other libraries as it [offers a considerable performance advantage](https://github.com/petkaantonov/bluebird/tree/master/benchmark).  In addition to Bluebird, the `couchbase-promises` module has been tested with:\r\n\r\n  * [ECMAScript `Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\r\n  * [`kew`](https://www.npmjs.com/package/kew)\r\n  * [`q`](https://www.npmjs.com/package/q)\r\n  * [`rsvp`](https://www.npmjs.com/package/rsvp)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsfields%2Fcouchbase-promises","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsfields%2Fcouchbase-promises","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsfields%2Fcouchbase-promises/lists"}