
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
baseview is a minimalistic CouchBase client for node.js based on the minimalistic CouchDB driver nano.
CouchBase provides view data as JSON, which can be accessed and streamed with this client. To store and retrieve single documents/key-value pairs, the memcached-library is required.
baseview = require('baseview')('http://127.0.0.1:8092')
or
baseview = require('baseview')({url: 'http://127.0.0.1:8092', bucket: 'my_bucket'})
...
// retrieve data from a view
baseview.view('design_doc', 'view_name', function(error, data) {
console.log(error, data);
});
// retrieve data from a spatial index with bounding box.
// see 'sparta' for bbox calculations
baseview.spatial('geo', 'points', {bbox: bbox}, function(error, points) {
console.log(error, points);
});
//adding a design document
baseview.setDesign('design_doc', {
'names': {
'map': "function(doc){if(doc.name){emit(doc.name);}}"
},
'rating': {
'map': "function(doc){if(doc.name && doc.rating){emit(doc.rating);}}"
}
},
function(err, res){
// handle error http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-designdoc-api-storing.html
}
);
// retrieve a design document
baseview.getDesign('design_doc', function(err,res) {
// http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-designdoc-api-retrieving.html
});
// delete a design document
baseview.deleteDesign('design_doc', function(err, res) {
// handle error http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-designdoc-api-deleting.html
});
To create a geographical bounding box (bbox), have a look at sparta, a small library for geo calculations.
io.sockets.on('connection', function (socket) {
baseview.view('feed', 'images', function(error, data) {
socket.emit('image_feed', data.rows);
});
});
Tests are written in specify. To run the tests, execute: node tests/views.js node tests/spatial.js
everyone is welcome to contribute. patches, tests, bugfixes, new features
baseview in githubgit checkout -b my_branchgit push origin my_branchproudly presented by Patrick Heneise, Barcelona.
FAQs
minimalistic couchbase view client for node.js
We found that baseview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.