{"id":17680750,"url":"https://github.com/kcreate/range-array","last_synced_at":"2025-03-30T19:13:04.459Z","repository":{"id":72283040,"uuid":"61065745","full_name":"KCreate/range-array","owner":"KCreate","description":"Easily generate a range from a set of two numbers.","archived":false,"fork":false,"pushed_at":"2016-06-14T11:13:34.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T11:52:52.123Z","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/KCreate.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":"2016-06-13T20:00:16.000Z","updated_at":"2023-03-10T09:59:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"e08e9532-8810-413c-b3ca-c439f6fb9fa4","html_url":"https://github.com/KCreate/range-array","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KCreate%2Frange-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KCreate%2Frange-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KCreate%2Frange-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KCreate%2Frange-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KCreate","download_url":"https://codeload.github.com/KCreate/range-array/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365645,"owners_count":20765546,"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-24T09:08:46.047Z","updated_at":"2025-03-30T19:13:04.435Z","avatar_url":"https://github.com/KCreate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# range-array\n\n[![npm](https://img.shields.io/npm/dt/range-array.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/range-array)\n[![npm](https://img.shields.io/npm/v/range-array.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/range-array)\n[![npm](https://img.shields.io/npm/l/range-array.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/range-array)\n\nEasily generate a range from a set of two numbers. Tries to approximate the [range function from python](http://pythoncentral.io/pythons-range-function-explained/).\n\nAutomatically determines wether the step value should be interpreted as a negative or a positive number.\n\n# Installation\n\n```sh\nnpm install --save range-array\n```\n\n# Usage\n\nRanges are generated from a start number(inclusive), end number(exclusive) and an incrementor. The incrementor is optional.\n\n```javascript\nconst range = require('range-array');\n\nrange(0, 5);\n// [0, 1, 2, 3, 4]\n\nrange(5, -2);\n// [5, 4, 3, 2, 1, 0, -1]\n\nrange(0, 100, 20);\n// [0, 20, 40, 60, 80]\n```\n\n# API\n\n### range(start, end[, incrementor = 1]) =\u003e array\nReturns an array containing all numbers between the start (inclusive) and the end(exclusive). By passing an incrementor, the rate at which the numbers grow can be determined. The default value for the incrementor is 1.\n\n```javascript\nrange(-100, 50, 50)\n// [-100, -50, 0]\n```\n\n# License\nCOPYRIGHT (c) 2016 [Leonard Schuetz](https://leonardschuetz.ch/about)\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcreate%2Frange-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkcreate%2Frange-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcreate%2Frange-array/lists"}