chesterfield

2.0.1 • Public • Published

Chesterfield

npm version Build Status Coverage Status

Chesterfield is wrapper for the Node JS Couchbase SDK for writing Functional Javascript.

Installation

npm install chesterfield --save

Running Tests

git clone https://github.com/binaryalchemist/chesterfield.git
cd chesterfield
npm test

Example

var cb = require('chesterfield');

var cluster = cb.cluster('couchbase://address2couchbase');
var bucket = cb.open(cluster, 'bucket_name', 'password');

var popeMobile = {
    id: 9000,
    type: 'miracle whip'
};

var popeMobileKey = 'vehicle_' + popeMobile.id;

cb.upsert(bucket, popeMobileKey, popeMobile, function(error, result) {
    cb.get(bucket, popeMobileKey, function(error, result) {
        console.log(JSON.stringify(result.value));
    });
});

Contributing

Please see CONTRIBUTING.md for more details on contributing to the repository.

Readme

Keywords

none

Package Sidebar

Install

npm i chesterfield

Weekly Downloads

9

Version

2.0.1

License

MIT

Unpacked Size

10.2 kB

Total Files

8

Last publish

Collaborators

  • binaryalchemist
  • johndietz