{"id":23529690,"url":"https://github.com/jaid/prepend-to-lines","last_synced_at":"2025-08-12T17:41:26.089Z","repository":{"id":57329847,"uuid":"192392079","full_name":"Jaid/prepend-to-lines","owner":"Jaid","description":"Adds given string to each line of text of another string.","archived":false,"fork":false,"pushed_at":"2023-03-03T18:16:46.000Z","size":2355,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T04:48:14.087Z","etag":null,"topics":["lib","library","lines","prepend","string","strings","text","util","utility"],"latest_commit_sha":null,"homepage":"https://github.com/Jaid/prepend-to-lines","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/Jaid.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"Jaid","custom":"https://twitch.tv/products/jaidchen"}},"created_at":"2019-06-17T17:41:14.000Z","updated_at":"2021-09-19T19:01:07.000Z","dependencies_parsed_at":"2023-01-29T02:46:08.854Z","dependency_job_id":null,"html_url":"https://github.com/Jaid/prepend-to-lines","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fprepend-to-lines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fprepend-to-lines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fprepend-to-lines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fprepend-to-lines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jaid","download_url":"https://codeload.github.com/Jaid/prepend-to-lines/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254142590,"owners_count":22021564,"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":["lib","library","lines","prepend","string","strings","text","util","utility"],"created_at":"2024-12-25T21:12:44.394Z","updated_at":"2025-05-14T12:32:47.193Z","avatar_url":"https://github.com/Jaid.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Jaid","https://twitch.tv/products/jaidchen","https://github.com/sponsors/jaid"],"categories":[],"sub_categories":[],"readme":"# prepend-to-lines\n\n\n\u003ca href=\"https://raw.githubusercontent.com/jaid/prepend-to-lines/master/license.txt\"\u003e\u003cimg src=\"https://img.shields.io/github/license/jaid/prepend-to-lines?style=flat-square\" alt=\"License\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/sponsors/jaid\"\u003e\u003cimg src=\"https://img.shields.io/badge/\u003c3-Sponsor-FF45F1?style=flat-square\" alt=\"Sponsor prepend-to-lines\"/\u003e\u003c/a\u003e  \n\u003ca href=\"https://actions-badge.atrox.dev/jaid/prepend-to-lines/goto\"\u003e\u003cimg src=\"https://img.shields.io/endpoint.svg?style=flat-square\u0026url=https%3A%2F%2Factions-badge.atrox.dev%2Fjaid%2Fprepend-to-lines%2Fbadge\" alt=\"Build status\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/prepend-to-lines/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/commits-since/jaid/prepend-to-lines/v1.0.2?style=flat-square\u0026logo=github\" alt=\"Commits since v1.0.2\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/prepend-to-lines/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/jaid/prepend-to-lines?style=flat-square\u0026logo=github\" alt=\"Last commit\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/prepend-to-lines/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/jaid/prepend-to-lines?style=flat-square\u0026logo=github\" alt=\"Issues\"/\u003e\u003c/a\u003e  \n\u003ca href=\"https://npmjs.com/package/prepend-to-lines\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/prepend-to-lines?style=flat-square\u0026logo=npm\u0026label=latest%20version\" alt=\"Latest version on npm\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/prepend-to-lines/network/dependents\"\u003e\u003cimg src=\"https://img.shields.io/librariesio/dependents/npm/prepend-to-lines?style=flat-square\u0026logo=npm\" alt=\"Dependents\"/\u003e\u003c/a\u003e \u003ca href=\"https://npmjs.com/package/prepend-to-lines\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/prepend-to-lines?style=flat-square\u0026logo=npm\" alt=\"Downloads\"/\u003e\u003c/a\u003e\n\n**Prepends a string to each line of another string.**\n\n\n\n\n\n## Installation\n\n\u003ca href=\"https://npmjs.com/package/prepend-to-lines\"\u003e\u003cimg src=\"https://img.shields.io/badge/npm-prepend--to--lines-C23039?style=flat-square\u0026logo=npm\" alt=\"prepend-to-lines on npm\"/\u003e\u003c/a\u003e\n\n```bash\nnpm install --save prepend-to-lines@^1.0.2\n```\n\n\u003ca href=\"https://yarnpkg.com/package/prepend-to-lines\"\u003e\u003cimg src=\"https://img.shields.io/badge/Yarn-prepend--to--lines-2F8CB7?style=flat-square\u0026logo=yarn\u0026logoColor=white\" alt=\"prepend-to-lines on Yarn\"/\u003e\u003c/a\u003e\n\n```bash\nyarn add prepend-to-lines@^1.0.2\n```\n\n\u003ca href=\"https://github.com/jaid/prepend-to-lines/packages\"\u003e\u003cimg src=\"https://img.shields.io/badge/GitHub Packages-@jaid/prepend--to--lines-24282e?style=flat-square\u0026logo=github\" alt=\"@jaid/prepend-to-lines on GitHub Packages\"/\u003e\u003c/a\u003e  \n(if [configured properly](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages))\n\n```bash\nnpm install --save @jaid/prepend-to-lines@^1.0.2\n```\n\n\n\n## Example\n\n\n```javascript\nimport prependToLines from \"prepend-to-lines\"\n\nconst text = \"I\\nwant\\nto\\nbe\\na\\nMarkdown\\nlist\"\nconst result = prependToLines(text, \"- \")\n\nconst linesArray = [\"Hello\", \"world\"]\nconst result2 = prependToLines(linesArray, \"x\")\n\nconst result3 = prependToLines(\"Without linebreaks\", \"* \")\n```\n\nVariable `result` will be:\n\n```javascript\n\"- I\\n- want\\n- to\\n- be\\n- a\\n- Markdown\\n- list\"\n```\nVariable `result2` will be:\n\n```javascript\n\"xHello\\nxworld\"\n```\nVariable `result3` will be:\n\n```javascript\n\"* Without linebreaks\"\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Development\n\n\n\nSetting up:\n```bash\ngit clone git@github.com:jaid/prepend-to-lines.git\ncd prepend-to-lines\nnpm install\n```\nTesting:\n```bash\nnpm run test:dev\n```\nTesting in production environment:\n```bash\nnpm run test\n```\n\n\n## License\n[MIT License](https://raw.githubusercontent.com/jaid/prepend-to-lines/master/license.txt)  \nCopyright © 2020, Jaid \\\u003cjaid.jsx@gmail.com\u003e (https://github.com/jaid)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fprepend-to-lines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaid%2Fprepend-to-lines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fprepend-to-lines/lists"}