{"id":19560667,"url":"https://github.com/zoubin/count-sorted","last_synced_at":"2026-05-12T21:09:52.863Z","repository":{"id":145175566,"uuid":"41840541","full_name":"zoubin/count-sorted","owner":"zoubin","description":"Count the number of elements in a sorted collection less than, equal, or greater than the given value","archived":false,"fork":false,"pushed_at":"2015-09-03T04:04:56.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-05T21:23:52.670Z","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/zoubin.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":"2015-09-03T03:37:17.000Z","updated_at":"2015-09-03T04:01:54.000Z","dependencies_parsed_at":"2023-03-23T18:18:52.151Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/count-sorted","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zoubin/count-sorted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fcount-sorted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fcount-sorted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fcount-sorted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fcount-sorted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/count-sorted/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fcount-sorted/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32957053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-11T05:08:26.175Z","updated_at":"2026-05-12T21:09:52.848Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# count-sorted\nCount the number of elements in a sorted collection less than, equal, or greater than the given value.\n\nThe collection should be either ascending or non-ascending.\n\n## Example\n\n```javascript\nvar equal = require('count-sorted/equal');\nvar less = require('count-sorted/less');\nvar greater = require('count-sorted/greater');\n\nconsole.log(\n  equal([1, 1, 2, 2, 3, 3], 2)  // 2\n);\n\nconsole.log(\n  less([1, 1, 2, 2, 3, 3], 2)  // 2\n);\n\nconsole.log(\n  greater([1, 1, 2, 2, 3, 3], 2)  // 2\n);\n\nconsole.log(\n  equal(\n    [{ x: 1 }, { x: 1 }, { x: 2 }, { x: 2 }, { x: 3 }, { x: 3 }],\n    { x: 2 },\n    function (a, b) {\n      return a.x - b.x;\n    }\n  )\n  // 2\n);\n\nconsole.log(\n  less(\n    [{ x: 1 }, { x: 1 }, { x: 2 }, { x: 2 }, { x: 3 }, { x: 3 }],\n    { x: 2 },\n    function (a, b) {\n      return a.x \u003c b.x;\n    }\n  )\n  // 2\n);\n\nconsole.log(\n  greater(\n    [{ x: 1 }, { x: 1 }, { x: 2 }, { x: 2 }, { x: 3 }, { x: 3 }],\n    { x: 2 },\n    function (a, b) {\n      return a.x \u003e b.x;\n    }\n  )\n  // 2\n);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fcount-sorted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Fcount-sorted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fcount-sorted/lists"}