{"id":15502845,"url":"https://github.com/johno/comma-split","last_synced_at":"2025-03-19T20:11:02.727Z","repository":{"id":26297918,"uuid":"29745768","full_name":"johno/comma-split","owner":"johno","description":"Split comma delimited strings into an array.","archived":false,"fork":false,"pushed_at":"2015-07-14T17:47:59.000Z","size":149,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-22T03:00:22.753Z","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/johno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-23T18:08:28.000Z","updated_at":"2015-07-14T17:10:59.000Z","dependencies_parsed_at":"2022-07-24T10:31:57.418Z","dependency_job_id":null,"html_url":"https://github.com/johno/comma-split","commit_stats":null,"previous_names":["johnotander/comma-split"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fcomma-split","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fcomma-split/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fcomma-split/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Fcomma-split/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johno","download_url":"https://codeload.github.com/johno/comma-split/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244498514,"owners_count":20462344,"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-10-02T09:11:17.531Z","updated_at":"2025-03-19T20:11:02.708Z","avatar_url":"https://github.com/johno.png","language":"JavaScript","readme":"# comma-split [![Build Status](https://secure.travis-ci.org/johnotander/comma-split.png?branch=master)](https://travis-ci.org/johnotander/comma-split)\n\nSplit comma delimited strings into an array. Optional handling for trailing\nand/or leading whitespace.\n\n## Installation\n\n```bash\nnpm install --save comma-split\n```\n\n## Usage\n\n```javascript\nvar commaSplit = require('comma-split');\n\ncommaSplit('some, string,\\r\\r\\n\\tdelimited\\n,by, commas');\n// =\u003e ['some','string','delimited','by','commas']\n\ncommaSplit('some, string,\\r\\r\\n\\tdelimited\\n,by, commas', { ignoreWhitespace: true });\n// =\u003e ['some',' string','\\r\\r\\n\\tdelimited\\n','by',' commas']\n\ncommaSplit('some, string,\\r\\r\\n\\tdelimited\\n,by, commas', { ignoreTrailingWhitespace: true });\n// =\u003e ['some','string','delimited\\n','by','commas']\n\ncommaSplit('some, string,\\r\\r\\n\\tdelimited\\n,by, commas', { ignoreLeadingWhitespace: true });\n// =\u003e ['some',' string','\\r\\r\\n\\tdelimited','by',' commas']\n\ncommaSplit(',,some, string,\\r\\r\\n\\tdelimited\\n,by, commas,');\n// =\u003e ['','','some','string','delimited','by','commas','']\n\ncommaSplit(',,some, string,\\r\\r\\n\\tdelimited\\n,by, commas, ,,', { ignoreBlank: true });\n// =\u003e [some','string','delimited','by','commas']\n\ncommaSplit('some, string, with,a, dupe, dupe', { ignoreDuplicate: true });\n// =\u003e [some','string','with', 'a', 'dupe'']\n```\n\n### Options\n\n* `ignoreWhitespace`:`boolean` - Ignore leading and trailing whitespace.\n* `ignoreTrailingWhitespace`:`boolean` - Ignore trailing whitespace.\n* `ignoreLeadingWhitespace`:`boolean` - Ignore leading whitespace.\n* `ignoreDuplicate`:`boolean` - Ignore duplicate elements.\n\n## License\n\nMIT\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nCrafted with \u003c3 by John Otander ([@4lpine](https://twitter.com/4lpine)).\n\nThis package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fcomma-split","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohno%2Fcomma-split","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Fcomma-split/lists"}