{"id":16351595,"url":"https://github.com/tomeraberbach/partition-interval","last_synced_at":"2025-03-23T01:30:52.073Z","repository":{"id":229540287,"uuid":"777016297","full_name":"TomerAberbach/partition-interval","owner":"TomerAberbach","description":"Partitions an interval as evenly as possible.","archived":false,"fork":false,"pushed_at":"2024-10-15T03:35:35.000Z","size":663,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T16:13:25.095Z","etag":null,"topics":["interval","nodejs","npm-module","npm-package","partitioning-algorithms"],"latest_commit_sha":null,"homepage":"https://npm.im/partition-interval","language":"TypeScript","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/TomerAberbach.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license-apache","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":"2024-03-25T02:49:23.000Z","updated_at":"2025-02-01T19:01:33.000Z","dependencies_parsed_at":"2024-05-10T17:29:40.789Z","dependency_job_id":"f054da7b-26c9-4c94-9006-81fc8199b531","html_url":"https://github.com/TomerAberbach/partition-interval","commit_stats":null,"previous_names":["tomeraberbach/partition-interval"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpartition-interval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpartition-interval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpartition-interval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fpartition-interval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomerAberbach","download_url":"https://codeload.github.com/TomerAberbach/partition-interval/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043843,"owners_count":20551840,"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":["interval","nodejs","npm-module","npm-package","partitioning-algorithms"],"created_at":"2024-10-11T01:23:18.840Z","updated_at":"2025-03-23T01:30:51.669Z","avatar_url":"https://github.com/TomerAberbach.png","language":"TypeScript","funding_links":["https://github.com/sponsors/TomerAberbach"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  partition-interval\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.org/package/partition-interval\"\u003e\n    \u003cimg src=\"https://badgen.now.sh/npm/v/partition-interval\" alt=\"version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/TomerAberbach/partition-interval/actions\"\u003e\n    \u003cimg src=\"https://github.com/TomerAberbach/partition-interval/workflows/CI/badge.svg\" alt=\"CI\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://unpkg.com/partition-interval/dist/index.min.js\"\u003e\n    \u003cimg src=\"https://deno.bundlejs.com/?q=partition-interval\u0026badge\" alt=\"gzip size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://unpkg.com/partition-interval/dist/index.min.js\"\u003e\n    \u003cimg src=\"https://deno.bundlejs.com/?q=partition-interval\u0026config={%22compression%22:{%22type%22:%22brotli%22}}\u0026badge\" alt=\"brotli size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/sponsors/TomerAberbach\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86\" alt=\"Sponsor\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  Partitions an interval as evenly as possible.\n\u003c/div\u003e\n\n## Features\n\n- **Lazy:** returns an `Iterable` for the common case of not needing everything\n  in memory at once\n- **Small:** just ~260 B minzipped\n- **Robust:** property-based testing with\n  [`fast-check`](https://github.com/dubzzz/fast-check)\n\n## Install\n\n```sh\n$ npm i partition-interval\n```\n\n## Usage\n\n```js\nimport partitionInterval from 'partition-interval'\n\n// Lazily iterate over the returned iterable.\nfor (const interval of partitionInterval([0, 99], 4)) {\n  console.log(interval)\n}\n//=\u003e [ 0, 24 ]\n//=\u003e [ 25, 49 ]\n//=\u003e [ 50, 74 ]\n//=\u003e [ 75, 99 ]\n\n// Collect the returned iterable into an array.\nconst intervals = [...partitionInterval([-31, 89], 5)]\nconsole.log(intervals)\n//=\u003e [ [-31, -8], [-7, 16], [17, 40], [41, 64], [65, 89] ]\n```\n\n## Contributing\n\nStars are always welcome!\n\nFor bugs and feature requests,\n[please create an issue](https://github.com/TomerAberbach/partition-interval/issues/new).\n\n## License\n\n[MIT](https://github.com/TomerAberbach/partition-interval/blob/main/license) ©\n[Tomer Aberbach](https://github.com/TomerAberbach) \\\n[Apache 2.0](https://github.com/TomerAberbach/partition-interval/blob/main/license-apache)\n© [Google](https://github.com/TomerAberbach/partition-interval/blob/main/notice-apache)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomeraberbach%2Fpartition-interval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomeraberbach%2Fpartition-interval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomeraberbach%2Fpartition-interval/lists"}