{"id":21595191,"url":"https://github.com/euank/node-parse-numeric-range","last_synced_at":"2025-04-11T00:06:50.234Z","repository":{"id":17987535,"uuid":"20994687","full_name":"euank/node-parse-numeric-range","owner":"euank","description":"Parses expressions like 1-10,20-30. Returns an energetic array.","archived":false,"fork":false,"pushed_at":"2021-08-22T03:46:19.000Z","size":15,"stargazers_count":25,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T20:51:11.460Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/euank.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}},"created_at":"2014-06-19T09:19:31.000Z","updated_at":"2025-01-27T19:13:40.000Z","dependencies_parsed_at":"2022-09-05T17:00:39.169Z","dependency_job_id":null,"html_url":"https://github.com/euank/node-parse-numeric-range","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fnode-parse-numeric-range","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fnode-parse-numeric-range/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fnode-parse-numeric-range/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euank%2Fnode-parse-numeric-range/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euank","download_url":"https://codeload.github.com/euank/node-parse-numeric-range/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248129456,"owners_count":21052574,"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-24T17:33:46.311Z","updated_at":"2025-04-11T00:06:50.207Z","avatar_url":"https://github.com/euank.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"node-parse-numeric-range\n========================\n\nParses expressions like 1-10,20-30. Returns an energetic (as opposed to lazy) array.\n\n\n## Supported Expressions\nComprehensive supported expression examples:\n\n| Expression | result       |\n|:----------:|:------------:|\n|            |   []         |\n|     1      |   [1]        |\n|    1,2     |  [1,2]       |\n|    -10     |  [-10]       |\n|   -3,-3    |[-3, -3]      |\n|  -1-2,-2   |[-1,0,1,2,-2] |\n|  -1--2     |[-1,-2]       |\n|  -1..2,-2  |[-1,0,1,2,-2] |\n|  -1...3,-2 |[-1,0,1,2,-2] |\n|   1⋯3      |[1,2]         |\n|  1…3       |[1,2]         |\n|  1‥3       |[1,2,3]       |\n\n\nWhat's this useful for? Well, letting users input these sorts of things and then\nmaking them programmatically useful.\n\n\n## Usage\n\nFirst, `npm install parse-numeric-range`.\n\n```javascript\nconst rangeParser = require(\"parse-numeric-range\");\n\nconst numbers = rangeParser(\"4,6,8-10,12,14..16,18,20...23\");\n\nconsole.log(\n  `The first ${numbers.length} composite numbers are: ${numbers.join(\", \")}`,\n);\n```\n\n### ES6\n```jsx\nimport rangeParser from \"parse-numeric-range\";\n\nconst numbers = rangeParser(\"4,6,8-10,12,14..16,18,20...23\");\n\nconsole.log(\n  `The first ${numbers.length} composite numbers are: ${numbers.join(\", \")}`,\n);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuank%2Fnode-parse-numeric-range","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuank%2Fnode-parse-numeric-range","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuank%2Fnode-parse-numeric-range/lists"}