{"id":20109762,"url":"https://github.com/hyper63/async-pouchdb","last_synced_at":"2025-03-02T18:24:40.377Z","repository":{"id":55076574,"uuid":"329026562","full_name":"hyper63/async-pouchdb","owner":"hyper63","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-12T17:59:44.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T19:51:16.482Z","etag":null,"topics":[],"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/hyper63.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":"2021-01-12T15:18:11.000Z","updated_at":"2021-01-12T17:59:46.000Z","dependencies_parsed_at":"2022-08-14T11:20:23.005Z","dependency_job_id":null,"html_url":"https://github.com/hyper63/async-pouchdb","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fasync-pouchdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fasync-pouchdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fasync-pouchdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fasync-pouchdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyper63","download_url":"https://codeload.github.com/hyper63/async-pouchdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241550008,"owners_count":19980639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-13T18:09:22.472Z","updated_at":"2025-03-02T18:24:40.352Z","avatar_url":"https://github.com/hyper63.png","language":"JavaScript","readme":"# async-pouchdb\n\nasyncPouchdb is a library that converts the pouchdb api functions into Async Monads \nusing the `crocks` module. An Async Monad is an Algerbraic Data Type that manages \nasynchronous function calls in a lazy deterministic way. \n\n## What is pouchdb? \n\ncheck out https://pouchdb.com\n\n## What is crocks?\n\ncheck out https://crocks.dev\n\n## Install\n\n``` sh\nnpm install async-pouchdb\n```\n\n## Usage in NodeJS\n\n``` js\nconst createPouchdb = require('async-pouchdb')\nconst pouchdb = createPouchdb()\nconst db = await pouchdb('http://localhost:5984/db').toPromise()\ndb.allDocs()\n  .fork(\n    err =\u003e console.log(err),\n    result =\u003e console.log(result)\n  )\n```\n\n## Options\n\nThe default driver is `http`, but you can use other pouchdb drivers as well.\n\nWhen attaching a driver, it is important to provide both the name of the driver and \nthe plugin function. `{ name, driver }`.\n\n## websql example\n\n``` js\nconst createPouchdb = require('async-pouchdb')\nconst pouchdbAdapterNodeWebsql = require('pouchdb-adapter-node-websql')\n\nconst pouchdb = createPouchdb({ \n  name: 'websql', \n  driver: pouchdbAdapterNodeWebsql \n})\n\nconst db = await pouchdb('foo.db').toPromise()\ndb.allDocs()\n  .fork(\n    err =\u003e console.log(err),\n    result =\u003e console.log(result)\n  )\n```\n\n## memory example\n\n\n``` js\nconst createPouchdb = require('async-pouchdb')\nconst pouchdbAdapterMemory = require('async-pouchdb')\n\nconst createPouchdb = require('async-pouchdb')\nconst pouchdb = createPouchdb({ \n  name: 'memory', \n  driver: pouchdbAdapterMemory \n})\nconst db = await pouchdb('foo.db').toPromise()\n\ndb.allDocs()\n  .fork(\n    err =\u003e console.log(err),\n    result =\u003e console.log(result)\n  )\n```\n\n## LICENSE \n\nMIT\n\n## CONTRIBUTIONS\n\nWelcome\n\n## ACKNOWLEDGEMENTS\n\n* NodeJS - https://nodejs.org\n* PouchDB - https://pouchdb.com\n* Crocks - https://crocks.dev\n\n## MAINTAINERS\n\n* Tom Wilson - hyper63, LLC\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyper63%2Fasync-pouchdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyper63%2Fasync-pouchdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyper63%2Fasync-pouchdb/lists"}