{"id":22710560,"url":"https://github.com/smallhelm/contra-find","last_synced_at":"2025-10-19T19:31:52.246Z","repository":{"id":57206596,"uuid":"62252910","full_name":"smallhelm/contra-find","owner":"smallhelm","description":"Using contra, asynchronously find a value in a collection that matches a condition.","archived":false,"fork":false,"pushed_at":"2016-06-29T20:00:48.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T12:49:38.044Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smallhelm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-29T19:39:03.000Z","updated_at":"2020-01-26T18:05:31.000Z","dependencies_parsed_at":"2022-09-08T14:21:19.018Z","dependency_job_id":null,"html_url":"https://github.com/smallhelm/contra-find","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fcontra-find","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fcontra-find/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fcontra-find/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fcontra-find/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallhelm","download_url":"https://codeload.github.com/smallhelm/contra-find/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237081490,"owners_count":19252388,"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-12-10T12:10:30.403Z","updated_at":"2025-10-19T19:31:46.966Z","avatar_url":"https://github.com/smallhelm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# contra-find\n\n[![build status](https://secure.travis-ci.org/smallhelm/contra-find.svg)](https://travis-ci.org/smallhelm/contra-find)\n\nUsing contra, asynchronously find a value in a collection that matches a condition.\n\n```js\nvar λ = require('contra');\nvar find = require('contra-find');\n\nvar items = [\n  [1, 2],\n  [2, 3],\n  [3, 4],\n  [4, 5],\n  [5, 6]\n];\n\nfind(λ, items, function(item, next){\n\n  console.log('item :', item);\n\n  process.nextTick(function(){\n    console.log('check:', item);\n    next(undefined, item[0] === 3);\n  });\n\n}, function(err, item){\n  console.log('item found!', item);\n});\n```\noutput\n```\nitem : [ 1, 2 ]\ncheck: [ 1, 2 ]\nitem : [ 2, 3 ]\ncheck: [ 2, 3 ]\nitem : [ 3, 4 ]\ncheck: [ 3, 4 ]\nitem found! [ 3, 4 ]\n```\nNotice that it iterates in series and stops as soon as the item is found.\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fcontra-find","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallhelm%2Fcontra-find","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fcontra-find/lists"}