{"id":15361847,"url":"https://github.com/tj/co-monk","last_synced_at":"2025-07-03T15:12:42.764Z","repository":{"id":12602724,"uuid":"15273691","full_name":"tj/co-monk","owner":"tj","description":"MongoDB generator goodness for node.js","archived":false,"fork":false,"pushed_at":"2016-01-13T23:33:51.000Z","size":136,"stargazers_count":155,"open_issues_count":5,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-15T05:51:20.580Z","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/tj.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2013-12-18T04:30:37.000Z","updated_at":"2023-08-22T09:59:58.000Z","dependencies_parsed_at":"2022-08-27T01:31:21.774Z","dependency_job_id":null,"html_url":"https://github.com/tj/co-monk","commit_stats":null,"previous_names":["visionmedia/co-monk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tj/co-monk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fco-monk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fco-monk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fco-monk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fco-monk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tj","download_url":"https://codeload.github.com/tj/co-monk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fco-monk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260022883,"owners_count":22947246,"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-10-01T12:56:54.396Z","updated_at":"2025-07-03T15:12:42.743Z","avatar_url":"https://github.com/tj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# co-monk\n\n  MongoDB with generator goodness.\n\n## Installation\n\n```\n$ npm install co-monk\n```\n\n## Setup\n\n  Call `wrap()` on collections to make them generator friendly:\n\n```js\nvar monk = require('monk');\nvar wrap = require('co-monk');\nvar db = monk('localhost/test');\n\nvar users = wrap(db.get('users'));\n```\n\n## Example\n\n  Simple example:\n\n```js\nyield users.remove({});\n\nyield users.insert({ name: 'Tobi', species: 'ferret' });\nyield users.insert({ name: 'Loki', species: 'ferret' });\nyield users.insert({ name: 'Jane', species: 'ferret' });\n\nvar res = yield users.findOne({ name: 'Tobi' });\nres.name.should.equal('Tobi');\n\nvar res = yield users.find({ species: 'ferret' });\nres.should.have.length(3);\n```\n\n  Parallel inserts:\n\n```js\nyield users.remove({});\n\nyield [\n  users.insert({ name: 'Tobi', species: 'ferret' }),\n  users.insert({ name: 'Loki', species: 'ferret' }),\n  users.insert({ name: 'Jane', species: 'ferret' })\n];\n\nvar res = yield users.findOne({ name: 'Tobi' });\nres.name.should.equal('Tobi');\n\nvar res = yield users.find({ species: 'ferret' });\nres.should.have.length(3);\n```\n\n# License\n\n  MIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj%2Fco-monk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftj%2Fco-monk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj%2Fco-monk/lists"}