{"id":21078792,"url":"https://github.com/worka/react-js-nl2br","last_synced_at":"2025-05-16T08:32:01.958Z","repository":{"id":65474390,"uuid":"410725356","full_name":"worka/react-js-nl2br","owner":"worka","description":"Replacing newline char with \u003cbr\u003e in React. Does not generate any extra empty unnecessary lines and \u003cbr\u003e","archived":false,"fork":false,"pushed_at":"2022-04-22T03:05:30.000Z","size":49,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-04T23:51:26.946Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/worka.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":"2021-09-27T03:08:09.000Z","updated_at":"2022-02-11T06:08:32.000Z","dependencies_parsed_at":"2023-01-25T12:46:04.686Z","dependency_job_id":null,"html_url":"https://github.com/worka/react-js-nl2br","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worka%2Freact-js-nl2br","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worka%2Freact-js-nl2br/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worka%2Freact-js-nl2br/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worka%2Freact-js-nl2br/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/worka","download_url":"https://codeload.github.com/worka/react-js-nl2br/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225415179,"owners_count":17470848,"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-11-19T19:42:22.388Z","updated_at":"2024-11-19T19:42:23.017Z","avatar_url":"https://github.com/worka.png","language":"JavaScript","readme":"# react-js-nl2br\n\nReplacing newline char with `\u003cbr\u003e` in React\n\nDoes not generate any extra empty unnecessary lines and `\u003cbr\u003e`\n\n### Install\n\n```cmd\nnpm i react-js-nl2br\n```\n\nor\n\n```cmd\nyarn add react-js-nl2br\n```\n\n### Get started\n\n```javascript\nimport React from 'react';\nimport { nl2br } from 'react-js-nl2br';\n\nfunction Component({ text }) {\n    return (\n        \u003cdiv\u003e{ nl2br(text) }\u003c/div\u003e\n    );\n}\n```\n\nDo not rush to use this plugin, perhaps this CSS property will help you solve the problem: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space 😉\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworka%2Freact-js-nl2br","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworka%2Freact-js-nl2br","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworka%2Freact-js-nl2br/lists"}