{"id":17664437,"url":"https://github.com/tilfin/readline-transform","last_synced_at":"2025-10-12T16:18:19.660Z","repository":{"id":57348715,"uuid":"112462961","full_name":"tilfin/readline-transform","owner":"tilfin","description":"Transform stream to read content line-by-line and write a string","archived":false,"fork":false,"pushed_at":"2025-02-07T14:25:52.000Z","size":75,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-21T17:22:14.888Z","etag":null,"topics":["byline","nodejs","npm","readline","stream","transform"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilfin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-29T10:45:18.000Z","updated_at":"2025-02-07T14:23:32.000Z","dependencies_parsed_at":"2025-05-07T23:45:14.260Z","dependency_job_id":"639cc1c4-055b-4aa3-817c-75634658e99a","html_url":"https://github.com/tilfin/readline-transform","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tilfin/readline-transform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Freadline-transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Freadline-transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Freadline-transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Freadline-transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilfin","download_url":"https://codeload.github.com/tilfin/readline-transform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Freadline-transform/sbom","scorecard":{"id":885283,"data":{"date":"2025-08-11","repo":{"name":"github.com/tilfin/readline-transform","commit":"c0de5fe7fa0a1c29c452f3125d97bc96be7e10f5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/tilfin/readline-transform/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/tilfin/readline-transform/ci.yaml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yaml:23","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T09:47:32.835Z","repository_id":57348715,"created_at":"2025-08-24T09:47:32.835Z","updated_at":"2025-08-24T09:47:32.835Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011986,"owners_count":26085040,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["byline","nodejs","npm","readline","stream","transform"],"created_at":"2024-10-23T20:05:26.189Z","updated_at":"2025-10-12T16:18:19.603Z","avatar_url":"https://github.com/tilfin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReadlineTransform\n\n[![npm](https://img.shields.io/npm/v/readline-transform.svg)](https://www.npmjs.com/package/readline-transform)\n[![Node](https://img.shields.io/node/v/readline-transform.svg)]()\n[![License](https://img.shields.io/github/license/tilfin/readline-transform.svg)]()\n\nReading String or Buffer content from a Readable stream and writing each line which ends without line break as object\n\n## Install\n\n```\n$ npm install -save readline-transform\n```\n\n## How to Use\n\n### Create a ReadlineTransform\n\n**new ReadlineTransform(options)**\n\n* `options` `\u003cObject\u003e`\n  * `breakMatcher` is the regular expression to split content by line break for `str.split()`. (default: `/\\r?\\n/`)\n  * `ignoreEndOfBreak` is boolean. if content ends with line break, ignore last empty line. (default: `true`)\n  * `skipEmpty` is boolean. if line is empty string, skip it (default: `false`)\n\n## Examples\n\n### CommonJS \n\n```javascript\nconst { PassThrough } = require('stream');\nconst { ReadlineTransform } = require('readline-transform');\n\nconst readStream = new PassThrough();\nconst transform = new ReadlineTransform({ skipEmpty: true });\nconst writeStream = new PassThrough({ objectMode: true });\n\nwriteStream.on('data', (line) =\u003e {\n  console.log(line);\n}).on('finish', () =\u003e {\n  console.log('\u003c\u003c\u003c all done \u003e\u003e\u003e');\n});\n\nreadStream.pipe(transform).pipe(writeStream);\n\nreadStream.write(new Buffer('foo\\nba'));\nreadStream.write(new Buffer('r\\r\\n\\n\\r'));\nreadStream.end(new Buffer('\\nbaz'));\n```\n\n### ES Module \n\n```javascript\nimport fs from 'node:fs';\nimport { PassThrough } from 'node:stream'; \nimport { ReadlineTransform } from 'readline-transform';\n\nconst readStream = new PassThrough();\nconst transform = new ReadlineTransform({ skipEmpty: true });\nconst writeStream = new PassThrough({ objectMode: true });\n\nwriteStream.on('data', (line) =\u003e {\n  console.log(line);\n}).on('finish', () =\u003e {\n  console.log('\u003c\u003c\u003c all done \u003e\u003e\u003e');\n});\n\nreadStream.pipe(transform).pipe(writeStream);\n\nreadStream.write(new Buffer('foo\\nba'));\nreadStream.write(new Buffer('r\\r\\n\\n\\r'));\nreadStream.end(new Buffer('\\nbaz'));\n```\n\n### Console output\n\n```\n$ node example.js\nfoo\nbar\nbaz\n\u003c\u003c\u003c all done \u003e\u003e\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Freadline-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilfin%2Freadline-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Freadline-transform/lists"}