Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
CouchDB library with a simple, functional-programing-friendly API, returning Bluebird promise.
Forked from Cot
npm install blue-cot
blue-cot
is this
-free: no need to bind functions contexts!4xx
and 5xx
responses will return rejected promises (should be handled with .catch
)const bluecot = require('blue-cot')
const config = {
// MUST
hostname: 'localhost'
port: 5984,
// MAY
ssl: true
// use one of the two:
// together
auth: 'username:password'
// or separated
user: 'username'
pass: 'password'
// logs the generated URLs and body
debug: true
}
const getDbApi = bluecot(config)
const db = getDbApi('some-db-name')
Those are the same than for cot-node
. Just remember this difference in error handling: here, 4xx
and 5xx
responses from CouchDB will return rejected promises (should be handled with .catch
)
takes doc ids, returns docs
db.fetch([ 'doc-1', 'doc-2', 'doc-3' ])
.then(function (docs) {
docs[0]._id === 'doc-1' // true
docs[1]._id === 'doc-2' // true
docs[2]._id === 'doc-3' // true
})
To access those, pass a design doc name as second argument
const db = getDbApi('some-db-name', 'some-design-doc-name')
If you find this module useful, consider making a PR to improve the documentation
3.1.0 - 2017-01-14
db.fetch
FAQs
CouchDB library with a simple, functional-programing-friendly API, returning promises
The npm package blue-cot receives a total of 14 weekly downloads. As such, blue-cot popularity was classified as not popular.
We found that blue-cot demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.