{"id":29567152,"url":"https://github.com/alexstevovich/commadus-node","last_synced_at":"2026-02-20T17:01:48.494Z","repository":{"id":288639223,"uuid":"948784934","full_name":"alexstevovich/commadus-node","owner":"alexstevovich","description":"[Node.js] Elegantly formats lists with proper punctuation, including support for the Oxford comma.","archived":false,"fork":false,"pushed_at":"2025-03-15T00:39:14.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-24T20:00:06.696Z","etag":null,"topics":["atomic","formatting","list","nodejs","prose"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexstevovich.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-15T00:38:26.000Z","updated_at":"2025-03-15T00:39:52.000Z","dependencies_parsed_at":"2025-04-19T06:22:57.504Z","dependency_job_id":"4daadd41-eafb-4c49-b850-8016854da72b","html_url":"https://github.com/alexstevovich/commadus-node","commit_stats":null,"previous_names":["alexstevovich/commadus-node"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexstevovich/commadus-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexstevovich%2Fcommadus-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexstevovich%2Fcommadus-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexstevovich%2Fcommadus-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexstevovich%2Fcommadus-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexstevovich","download_url":"https://codeload.github.com/alexstevovich/commadus-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexstevovich%2Fcommadus-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29658167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T16:33:43.953Z","status":"ssl_error","status_checked_at":"2026-02-20T16:33:43.598Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["atomic","formatting","list","nodejs","prose"],"created_at":"2025-07-18T23:10:38.330Z","updated_at":"2026-02-20T17:01:48.477Z","avatar_url":"https://github.com/alexstevovich.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# commadus\n\nMaster the art of the comma.\n\n\u003e **Archetype:** Node.js package  \n\u003e **Purpose:** Formats lists with elegant punctuation, including optional Oxford commas.\n\n**Commadus** elegantly formats lists with proper punctuation, including support for the **Oxford comma**.\n\n## Details\n\n- **Proper List Formatting** – Outputs grammatically correct lists in prose.\n- **Oxford Comma Support** – Toggle the famous **oxford comma** on or off.\n- **Handles Edge Cases** – Works with lists of any length, from empty arrays to long item lists.\n- **Lightweight \u0026 Fast** – A single function, no dependencies.\n\n## Install\n\n```sh\nnpm install commadus\n```\n\n## ⚙️ API\n\n### `list(items, options?)`\n\nFormats an array of items into a **human-readable list** with optional Oxford comma.\n\n#### Parameters\n\n| Name             | Type       | Default            | Description                                           |\n| ---------------- | ---------- | ------------------ | ----------------------------------------------------- |\n| `items`          | `string[]` | **Required**       | The list of items to format.                          |\n| `options`        | `Object`   | `{ oxford: true }` | Formatting options.                                   |\n| `options.oxford` | `boolean`  | `true`             | Whether to include the **Oxford comma** before \"and\". |\n\n#### Returns\n\n- **`string`** – The **formatted** list.\n\n## Usage\n\n```js\nimport list from 'commadus';\n\nconsole.log(list(['apple', 'banana', 'cherry']));\n// \"apple, banana, and cherry\"\n\nconsole.log(list(['apple', 'banana', 'cherry'], { oxford: false }));\n// \"apple, banana and cherry\"\n\nconsole.log(list(['moon', 'stars']));\n// \"moon and stars\"\n\nconsole.log(list(['sun']));\n// \"sun\"\n\nconsole.log(list([]));\n// \"\"\n```\n\n### Development Homepage\n\n[https://github.com/alexstevovich/commadus-node](https://github.com/alexstevovich/commadus-node)\n\n\u003csub\u003e_This link might be suffixed with \"-node\" in the future if conflicts arise._\u003c/sub\u003e\n\n## License\n\nLicensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexstevovich%2Fcommadus-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexstevovich%2Fcommadus-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexstevovich%2Fcommadus-node/lists"}