
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
This module (on npm as relax) has the goal to make working with couchdb
simpler. E.g. one property of couch is that you can't lock tables or so,
when stuff fails, you just have to retry. That's not bad, it's good for
performance and stability. However, it might have made your life a bit
harder, especially if you were using a module that just overwrites changes.
Well, this module wants to make it simpler. Usage:
var db = new (require('relax'))({host: '127.0.0.1', port: 5984, ssl: false, db_name: 'test'})
Except for db_name, all options are optional and default to these values.
You can use these two methods to get and store documents:
# get a document from the database
# `id` gets escaped via encodeURIComponent
db.get(id, function done(errOrNull, doc){})
# store a document
# `id` gets escaped via encodeURIComponent
# This method does NOT handle conflicts, it will call back with an error!
db.store(id, doc, function done(errOrNull){})
db.alter(id, function modify(doc){}, function done(err){})
This method fetches the specified document, calls the modify callback on it
and stores the result of that callback. If an error occurs, it waits, repeats this
process, which means that it re-fetches the document, calls the modify
callback on it again and tries to store it again. It fails after ten errors
(conflicts don't count).
FAQs
Just relax, like you should with couch!
The npm package relax receives a total of 1 weekly downloads. As such, relax popularity was classified as not popular.
We found that relax 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
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.