{"id":16578054,"url":"https://github.com/glynnbird/cloudantlite","last_synced_at":"2026-05-19T07:08:10.578Z","repository":{"id":57200715,"uuid":"49967357","full_name":"glynnbird/cloudantlite","owner":"glynnbird","description":"CloudantLite - a super lightweight CouchDB/Cloudant library for Node.js","archived":false,"fork":false,"pushed_at":"2017-07-12T11:29:39.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-21T16:57:13.333Z","etag":null,"topics":["cloudant","couchdb","library","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glynnbird.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-19T16:46:36.000Z","updated_at":"2017-05-30T13:10:49.000Z","dependencies_parsed_at":"2022-09-16T15:11:55.403Z","dependency_job_id":null,"html_url":"https://github.com/glynnbird/cloudantlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glynnbird/cloudantlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fcloudantlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fcloudantlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fcloudantlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fcloudantlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glynnbird","download_url":"https://codeload.github.com/glynnbird/cloudantlite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnbird%2Fcloudantlite/sbom","scorecard":{"id":430501,"data":{"date":"2025-08-11","repo":{"name":"github.com/glynnbird/cloudantlite","commit":"8494299a65c4c06b04e9cf5b9a5e73e75a9fce03"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T03:13:19.639Z","repository_id":57200715,"created_at":"2025-08-19T03:13:19.639Z","updated_at":"2025-08-19T03:13:19.639Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33205617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudant","couchdb","library","nodejs"],"created_at":"2024-10-11T22:13:00.501Z","updated_at":"2026-05-19T07:08:10.547Z","avatar_url":"https://github.com/glynnbird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloudantlite\n\n[![npm version](https://badge.fury.io/js/cloudantlite.svg)](https://badge.fury.io/js/cloudantlite)\n\nA super-lightweight Node.js library for Cloudant/CouchDB. It takes the \"relax\" function from Nano and removes all of the other functions leaving you with only:\n\n* relax\n* get\n* put\n* post\n* del\n\nThis removes any abstraction the Nano library puts in place and teaches you the CouchDB HTTP API instead.\n\n## Installation\n\nInstall with npm\n\n```\nnpm install cloudantlite\n```\n\nThen in your code\n\n```\n  var cloudant = require('cloudantlite')('https://mykey:mypassword@myhost.cloudant.com');\n```\n\n## CRUD\n\n### Creating a database\n\n```\ncloudant.put( { db: 'mydb' }, function(err, data) {\n  console.log(err, data);\n});\n```\n\nor using Promises:\n\n```\ncloudant.put({ db: 'mydb' }).then(console.log);\n```\n\n### Querying the stats of a database\n\n```\ncloudant.get( { db: 'mydb' }, function(err, data) {\n  console.log(err, data);\n});\n// null { db_name: 'mydb', doc_count: 0, doc_del_count: 0, update_seq: 0, purge_seq: 0, compact_running: false, disk_size: 79, data_size: 0, i instance_start_time: '1453203828519666', disk_format_version: 6, committed_update_seq: 0 }\n```\n\nor \n\n```\ncloudant.get( { db: 'mydb' }).then(console.log);\n```\n\n### Deleting a database\n\n```\ncloudant.del( { 'db': 'glynn'}, function(err, data ) {\n  console.log(err, data);\n});\n// null { ok: true }\n```\n\nor\n\n```\ncloudant.del( { 'db': 'glynn'}).then(console.log);\n```\n\n### Creating a document - bring your own ID\n\n```\ncloudant.put( { 'db': 'mydb', doc: 'myid', body: { a:1,  b:2} }, function(err, data ) {\n  console.log(err, data);\n});\nnull { ok: true, id: 'myid', rev: '1-25f9b97d75a648d1fcd23f0a73d2776e' }\n```\n\nor\n\n```\ncloudant.put( { 'db': 'mydb', doc: 'myid', body: { a:1,  b:2} }).then(console.log);\n```\n\n### Creating a document - database generates the ID\n\n```\ncloudant.post( { 'db': 'mydb', body: { a:1,  b:2} }, function(err, data ) {\n  console.log(err, data);\n});\n// null{ ok: true, id: 'b7b12408c2b7059433eb0e8767006219', rev: '1-25f9b97d75a648d1fcd23f0a73d2776e' }\n```\n\nor\n\n```\ncloudant.post( { 'db': 'mydb', body: { a:1,  b:2} }).then(console.log);\n```\n\n### Updating a document \n\n```\ncloudant.put( { 'db': 'mydb', body: { a:1,  b:3}, doc: 'b7b12408c2b7059433eb0e8767006219', qs: { rev: '1-25f9b97d75a648d1fcd23f0a73d2776e' }}, function(err, data ) {\n  console.log(err, data);\n});\n// null { ok: true, id: 'b7b12408c2b7059433eb0e8767006219', rev: '2-8a759d1f5a1537bcf775ab7bc947b377' }\n```\n\nor\n\n```\ncloudant.put( { 'db': 'mydb', body: { a:1,  b:3}, doc: 'b7b12408c2b7059433eb0e8767006219', qs: { rev: '1-25f9b97d75a648d1fcd23f0a73d2776e' }}).then(console.log);\n```\n\n### Deleting a document\n\n```\ncloudant.del( { 'db': 'mydb', doc: 'b7b12408c2b7059433eb0e8767006219', qs: { rev: '2-8a759d1f5a1537bcf775ab7bc947b377' }}, function(err, data ) {\n  console.log(err, data);\n});\n// null { ok: true, id: 'b7b12408c2b7059433eb0e8767006219', rev: '3-e0da009d1c09ad26125b7bfa5c2ba0cb' }\n```\n\nor\n\n```\ncloudant.del( { 'db': 'mydb', doc: 'b7b12408c2b7059433eb0e8767006219', qs: { rev: '2-8a759d1f5a1537bcf775ab7bc947b377' }}).then(console.log);\n```\n\n\n## Extending the library\n\nAlthough `cloudantlite` is a minimal library, it can be programmatically extended to add your own functions:\n\n```\nvar getVersion = function (callback) {\n  this.relax({}, function (err, data) {\n    if (err) return callback(true, null);\n    callback(null, data.version);\n  });\n};\n\nvar update = function(db, docid, revid, body, callback) {\n  var opts = { method: 'put', 'db': db, doc: docid, qs: { rev: revid}, body: body};\n  this.relax(opts, callback);\n};\n\ncloudant.extend('getVersion', getVersion);\ncloudant.extend('update', update);\n\ncloudant.getVersion(function(err, data) {\n  console.log(err, data);\n});\n\ncloudant.update('mydb', 'myid', '1-25f9b97d75a648d1fcd23f0a73d2776e', { a:1, b:2, c:3, d:4}, function(err, data) {\n  console.log(err, data);\n});\n```\n\nThe above example shows how the `extend` function is used to attach functions to the library to provide helper functions to\n\n* return the version of CouchDB/Cloudant being used\n* update a known revision of a document\n\nThe functions use `this.relax` to perform API calls.\n\n## Debugging\n\nTo see debugging messages for each request made, run your code like so:\n\n```\nDEBUG=cloudantlite node test.js\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglynnbird%2Fcloudantlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglynnbird%2Fcloudantlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglynnbird%2Fcloudantlite/lists"}