{"id":22021455,"url":"https://github.com/lamansky/some","last_synced_at":"2026-04-13T21:03:23.485Z","repository":{"id":57126185,"uuid":"134566481","full_name":"lamansky/some","owner":"lamansky","description":"[Node.js] A better Array.prototype.some(). Supports iterables, whitelist testing, and more.","archived":false,"fork":false,"pushed_at":"2018-05-23T12:32:45.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T04:05:09.114Z","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/lamansky.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-23T12:30:00.000Z","updated_at":"2018-05-23T12:32:46.000Z","dependencies_parsed_at":"2022-08-31T08:20:14.180Z","dependency_job_id":null,"html_url":"https://github.com/lamansky/some","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/lamansky%2Fsome","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamansky%2Fsome/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamansky%2Fsome/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamansky%2Fsome/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamansky","download_url":"https://codeload.github.com/lamansky/some/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245084862,"owners_count":20558294,"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-30T06:12:08.343Z","updated_at":"2026-04-13T21:03:23.460Z","avatar_url":"https://github.com/lamansky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# some\n\nA better `Array.prototype.some()`. Supports iterables, whitelist testing, and more.\n\n## Installation\n\nRequires [Node.js](https://nodejs.org/) 6.0.0 or above.\n\n```bash\nnpm i @lamansky/some\n```\n\n## API\n\nThe module exports a single function.\n\n### Parameters\n\n1. Bindable: `iter` (iterable)\n2. Optional: `test` (function, array, or any): If a function is provided, iterated values will be evaluated on whether `test` returns `true` when passed the value. If an array is provided, iterated values will be evaluated on whether they are contained in the array. If some other value is provided, iterated values will be evaluated on whether they strictly equal `test`. If `test` is omitted, iterated values will be evaluated on whether they are truthy.\n\n### Return Value\n\nReturns `true` if any one of the iterated values of `iter` passes `test`; otherwise returns `false`.\n\n## Example\n\n```javascript\nconst some = require('@lamansky/some')\n\nconst arr = [1, 2, 3]\n\nsome(arr, n =\u003e n % 2 === 0) // true\nsome(arr, 1) // true\nsome(arr, [3, 4]) // true\n\nsome(arr, n =\u003e n \u003e 3) // false\nsome(arr, 4) // false\nsome(arr, [4, 5]) // false\n\n// Supports the bind operator\narr::some(n =\u003e n % 2 === 0) // true\n```\n\n## Related\n\n* [every](https://github.com/lamansky/every)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamansky%2Fsome","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamansky%2Fsome","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamansky%2Fsome/lists"}