{"id":15558307,"url":"https://github.com/gobengo/stream-slice","last_synced_at":"2025-03-29T15:30:13.247Z","repository":{"id":17937128,"uuid":"20913355","full_name":"gobengo/stream-slice","owner":"gobengo","description":"slice streams (e.g. to make an infinite one N-finite)","archived":false,"fork":false,"pushed_at":"2014-06-17T06:57:32.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T14:23:41.585Z","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/gobengo.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}},"created_at":"2014-06-17T06:56:41.000Z","updated_at":"2014-06-17T06:57:32.000Z","dependencies_parsed_at":"2022-09-24T20:00:52.008Z","dependency_job_id":null,"html_url":"https://github.com/gobengo/stream-slice","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/gobengo%2Fstream-slice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobengo%2Fstream-slice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobengo%2Fstream-slice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobengo%2Fstream-slice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gobengo","download_url":"https://codeload.github.com/gobengo/stream-slice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246204128,"owners_count":20740256,"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-02T15:29:51.553Z","updated_at":"2025-03-29T15:30:13.224Z","avatar_url":"https://github.com/gobengo.png","language":"JavaScript","readme":"# stream-slice\n\n\u003cimg style=\"max-width: 300px\" src=\"http://upload.wikimedia.org/wikipedia/commons/4/4c/Eierschneider.jpg\" /\u003e\n\nCreate a [stream](https://github.com/Livefyre/stream)/Transform that slices a stream piped into it. For example, take an infinite [stream-cycle](https://github.com/gobengo/stream-cycle) and limit it to N objects.\n\nA lot like Python's [itertools.islice](https://docs.python.org/2/library/itertools.html#itertools.islice)\n\n## Example\n\n```javascript\nvar cycle = require('stream-cycle');\nvar slice = require('stream-slice');\n\nvar infinite = cycle([1,0]);\nvar only5 = infinite.pipe(slice(100));\nonly5\n  .on('end', function () {\n    console.log('ended after 5');\n  })\n  .on('data', console.log);\n\n// 1\n// 0\n// 1\n// 0\n// 1\n// ended after 5\n```\n\n## `make` commands\n\n* `make build` - will `npm install` and `bower install`\n* `make dist` - will use r.js optimizer to compile the source, UMD wrap, and place that and source maps in dist/\n* `make clean`\n* `make server` - serve the repo over http\n* `make deploy [env={*prod,uat,qa}]` - Deploy to lfcdn, optionally specifying a bucket env\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobengo%2Fstream-slice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgobengo%2Fstream-slice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobengo%2Fstream-slice/lists"}