{"id":17059900,"url":"https://github.com/nisaacson/linerstream","last_synced_at":"2025-04-12T18:08:25.092Z","repository":{"id":13035674,"uuid":"15715393","full_name":"nisaacson/linerstream","owner":"nisaacson","description":"Split a readable stream by newline characters","archived":false,"fork":false,"pushed_at":"2017-03-12T16:51:45.000Z","size":19,"stargazers_count":5,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:05:29.918Z","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/nisaacson.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-01-07T20:14:02.000Z","updated_at":"2019-01-01T07:45:50.000Z","dependencies_parsed_at":"2022-09-07T14:12:01.541Z","dependency_job_id":null,"html_url":"https://github.com/nisaacson/linerstream","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisaacson%2Flinerstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisaacson%2Flinerstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisaacson%2Flinerstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisaacson%2Flinerstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nisaacson","download_url":"https://codeload.github.com/nisaacson/linerstream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610345,"owners_count":21132921,"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-14T10:35:40.058Z","updated_at":"2025-04-12T18:08:25.059Z","avatar_url":"https://github.com/nisaacson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linerstream\n\nSplit a readable stream by newline characters\n\n[![NPM](https://nodei.co/npm/linerstream.png)](https://nodei.co/npm/linerstream/)\n\n[![Build Status](https://travis-ci.org/nisaacson/linerstream.png)](https://travis-ci.org/nisaacson/linerstream)\n[![Dependency Status](https://david-dm.org/nisaacson/linerstream/status.png)](https://david-dm.org/nisaacson/linerstream)\n[![Code Climate](https://codeclimate.com/github/nisaacson/linerstream.png)](https://codeclimate.com/github/nisaacson/linerstream)\n\n# Installation\n```bash\nnpm install -S linerstream\n```\n\n# Usage\n\nCreate an instance of linestream and pipe a readable stream into that instance\n\n```javascript\nvar Linerstream = require('linerstream')\n// splitter is an instance of require('stream').Transform\nvar opts = {\n  highWaterMark: 2\n}\nvar splitter = new Linerstream(opts) // opts is optional\n\nvar readStream = fs.createReadStream('/file/with/line/breaks.txt')\nvar lineByLineStream = readStream.pipe(splitter)\nlineByLineStream.on('data', function(chunk) {\n  console.dir(chunk)  // no line breaks here :)\n})\n```\n\n\n## Override EOL\n\nIf you don't want to use the OS default `EOL` character, you can ovverride it when creating the stream\n\n```\nvar stream2 = new LinerStream({EOL: '\\n'})\n//force windows EOL\nvar stream3 = new LinerStream({EOL: '\\r\\n'})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisaacson%2Flinerstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnisaacson%2Flinerstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisaacson%2Flinerstream/lists"}