
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Minimalist localStorage database API. Works well as a cache for CouchDB documents.
npm install browserify
browserify index.js > couchie.js
<script type="text/javascript" src="couchie.js"></script>
<script type="text/javascript">
// get a database by name
var db = couchie('name')
// write a document, MUST include _id and _rev
db.post({_id:'550e8400-e29b-41d4-a716-446655440000', _rev:'1-550e8400', data:'test'}, function (e) {
if (e) throw e
// get a document by id
db.get('550e8400-e29b-41d4-a716-446655440000', function (e, doc) {
if (e) throw e
doc // {_id:'550e8400-e29b-41d4-a716-446655440000', _rev:'1-550e8400', data:'test'}
db.revs() // {'550e8400-e29b-41d4-a716-446655440000': '1-550e8400'}
// write documents in bulk, much more efficient
db.bulk([ /* array of docs */ ], function (e) {
if (e) throw e
// get array of all documents
db.all(function (e, docs) {
if (e) throw e
docs // array of all documents
})
})
})
})
</script>
If localStorage is blocking why is this a callback API?
In the future couchie may implement a few features that require a non-blocking API. The first is lock() which would queue any changes coming in to the database until the lock is removed. The second is pagination across documents for large operations, basically wrapping all the synchronous file access in setTimeout calls so that we don't block the main event loop on large db operations.
When localStorage is not available couchie assumes the environment is node.js and will write to the filesystem. In this case the name of the database is a directory to write files.
FAQs
Minimalist localStorage database API. Works well as a cache for CouchDB documents.
We found that couchie 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.