{"id":13518049,"url":"https://github.com/sindresorhus/normalize-newline","last_synced_at":"2025-07-15T10:34:40.897Z","repository":{"id":18187727,"uuid":"21304991","full_name":"sindresorhus/normalize-newline","owner":"sindresorhus","description":"Normalize the newline characters in a string to `\\n`","archived":false,"fork":false,"pushed_at":"2022-07-09T03:18:37.000Z","size":18,"stargazers_count":30,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-03T00:08:25.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2014-06-28T14:58:30.000Z","updated_at":"2025-01-07T20:10:58.000Z","dependencies_parsed_at":"2022-08-25T15:50:32.556Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/normalize-newline","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/sindresorhus/normalize-newline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fnormalize-newline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fnormalize-newline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fnormalize-newline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fnormalize-newline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/normalize-newline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fnormalize-newline/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265092029,"owners_count":23710107,"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-08-01T05:01:40.194Z","updated_at":"2025-07-15T10:34:40.876Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["JavaScript","Repository"],"sub_categories":["Text/String"],"readme":"# normalize-newline\n\n\u003e Normalize the [newline](https://en.wikipedia.org/wiki/Newline) characters in a string to `\\n`\n\n## Install\n\n```\n$ npm install normalize-newline\n```\n\n## Usage\n\n```js\nimport normalizeNewline from 'normalize-newline';\n\nnormalizeNewline('foo\\r\\nbar\\nbaz');\n//=\u003e 'foo\\nbar\\nbaz'\n\nnormalizeNewline(Buffer.from('foo\\r\\nbar\\nbaz')).toString();\n//=\u003e 'foo\\nbar\\nbaz'\n```\n\n## API\n\n### normalizeNewline(input)\n\n#### input\n\nType: `string | Buffer`\n\nInput to normalize.\n\n## Related\n\n- [normalize-newline-cli](https://github.com/sindresorhus/normalize-newline-cli) - CLI for this module\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fnormalize-newline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fnormalize-newline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fnormalize-newline/lists"}