{"id":36502730,"url":"https://github.com/funny-bytes/chai-quantifiers","last_synced_at":"2026-01-12T02:25:16.362Z","repository":{"id":42314407,"uuid":"122516440","full_name":"funny-bytes/chai-quantifiers","owner":"funny-bytes","description":"Array quantifier assertions for chai.","archived":false,"fork":false,"pushed_at":"2024-02-26T14:55:28.000Z","size":518,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-24T09:50:10.599Z","etag":null,"topics":["assertions","chai","unit-testing"],"latest_commit_sha":null,"homepage":"","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/funny-bytes.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-22T18:12:14.000Z","updated_at":"2023-02-10T07:45:53.000Z","dependencies_parsed_at":"2024-06-19T00:03:47.383Z","dependency_job_id":"31c11a35-02a6-4c03-a431-cc77e882aa83","html_url":"https://github.com/funny-bytes/chai-quantifiers","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":0.3278688524590164,"last_synced_commit":"250926b7bb02e8cdf944b937d959f8bad1d50de9"},"previous_names":["frankthelen/chai-quantifiers"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/funny-bytes/chai-quantifiers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funny-bytes%2Fchai-quantifiers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funny-bytes%2Fchai-quantifiers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funny-bytes%2Fchai-quantifiers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funny-bytes%2Fchai-quantifiers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funny-bytes","download_url":"https://codeload.github.com/funny-bytes/chai-quantifiers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funny-bytes%2Fchai-quantifiers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["assertions","chai","unit-testing"],"created_at":"2026-01-12T02:25:15.793Z","updated_at":"2026-01-12T02:25:16.351Z","avatar_url":"https://github.com/funny-bytes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chai-quantifiers\n\nArray quantifier assertions for [Chai](http://chaijs.com/) assertion library.\n\n![main workflow](https://github.com/funny-bytes/chai-quantifiers/actions/workflows/main.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/funny-bytes/chai-quantifiers/badge.svg?branch=master)](https://coveralls.io/github/funny-bytes/chai-quantifiers?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/44fb4c780c3f36b0d04f/maintainability)](https://codeclimate.com/github/funny-bytes/chai-quantifiers/maintainability)\n[![node](https://img.shields.io/node/v/chai-quantifiers.svg)]()\n[![code style](https://img.shields.io/badge/code_style-airbnb-brightgreen.svg)](https://github.com/airbnb/javascript)\n[![Types](https://img.shields.io/npm/types/chai-quantifiers.svg)](https://www.npmjs.com/package/chai-quantifiers)\n[![License Status](http://img.shields.io/npm/l/chai-quantifiers.svg)]()\n\n## Install\n\n```bash\nnpm install --save-dev chai chai-quantifiers\n```\n\n## Usage\n\nThere are three assertions available, applicable to arrays.\n\n* containAll -- Asserts that all array items are true in respect to a predicate.\n* containOne -- Asserts that at least one array item is true in respect to a predicate.\n* containExactlyOne -- Asserts that exactly one array item is true in respect to a predicate.\n\nA quick example:\n\n```javascript\nconst chai = require('chai');\nconst chaiQuantifiers = require('chai-quantifiers');\n\nchai.use(chaiQuantifiers);\n\nconst { expect } = chai;\n\ndescribe('chai-quantifiers', () =\u003e {\n  it('containAll should be true if all items are true', () =\u003e {\n    expect([0, 1, 2, 3]).to.containAll(item =\u003e item \u003c 4);\n  });\n  it('containOne should be true if at least one item is true', () =\u003e {\n    expect([0, 1, 2, 3]).to.containOne(item =\u003e item \u003e= 2);\n  });\n  it('containExactlyOne should be true if exactly one item is true', () =\u003e {\n    expect([0, 1, 2, 3]).to.containExactlyOne(item =\u003e item === 2);\n  });\n});\n```\n\nThis module also includes types for *TypeScript*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunny-bytes%2Fchai-quantifiers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunny-bytes%2Fchai-quantifiers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunny-bytes%2Fchai-quantifiers/lists"}