{"id":15547673,"url":"https://github.com/ryu1kn/multiline-string","last_synced_at":"2025-07-23T21:04:21.276Z","repository":{"id":30408988,"uuid":"124732896","full_name":"ryu1kn/multiline-string","owner":"ryu1kn","description":"Nicer look multiline string in your JavaScript","archived":false,"fork":false,"pushed_at":"2023-07-18T21:46:30.000Z","size":658,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T22:59:38.509Z","etag":null,"topics":["multiline-strings","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/multiline-string","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/ryu1kn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-03-11T07:18:20.000Z","updated_at":"2022-03-23T10:26:26.000Z","dependencies_parsed_at":"2024-10-27T16:08:47.109Z","dependency_job_id":"9a48e271-4438-4662-a1ba-676ef2ac32dd","html_url":"https://github.com/ryu1kn/multiline-string","commit_stats":{"total_commits":51,"total_committers":3,"mean_commits":17.0,"dds":"0.23529411764705888","last_synced_commit":"8da273ce6606aa1173e2c380493eb2a9429226d7"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ryu1kn/multiline-string","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu1kn%2Fmultiline-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu1kn%2Fmultiline-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu1kn%2Fmultiline-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu1kn%2Fmultiline-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryu1kn","download_url":"https://codeload.github.com/ryu1kn/multiline-string/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu1kn%2Fmultiline-string/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266747787,"owners_count":23978101,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["multiline-strings","npm-package"],"created_at":"2024-10-02T13:10:00.900Z","updated_at":"2025-07-23T21:04:21.225Z","avatar_url":"https://github.com/ryu1kn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ryu1kn/multiline-string.svg?branch=master)](https://travis-ci.org/ryu1kn/multiline-string)\n[![Coverage Status](https://coveralls.io/repos/github/ryu1kn/multiline-string/badge.svg?branch=master)](https://coveralls.io/github/ryu1kn/multiline-string?branch=master)\n\n# multiline-string\n\nRemove leading space characters to let you nicely indent your multiline strings in your code.\n\n## Prerequisite\n\n* Node v4+\n\n## Usage\n\nBy default, `multiline` detects indentation by looking at the first non-empty line.\nNotice that the first empty line is dropped from the output to let you to start\nthe first line with the indentation level you like.\n\n```js\nconst multiline = require('multiline-string')()\n\nconst s = multiline(`\n            1. xxx\n              a. yyy\n            2. zzz\n            `)\n\nconsole.log(s)\n// =\u003e \"1. xxx\\n  a. yyy\\n2. zzz\"\n```\n\nIf you want to start your string with an empty line, you can do:\n\n```js\nconst s = multiline(`\n\n            Line 1\n            Line 2\n            `)\n// =\u003e \"\\nLine 1\\nLine 2\\n\"\n```\n\nYou can also give `marginMark` to identify the start of each line\nto include indentation in the resulting text.\n\n```js\nconst multiline = require('multiline-string')({ marginMark: '|' })\n\nconst s = multiline(`\n            |  Usage: my-command file\n            |\n            |    -v, --version    Show version\n            |    -h, --help       Show help information\n            |`)\n\nconsole.log(s)\n// =\u003e \"  Usage: ...\\n\\n    -v, --version ...\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryu1kn%2Fmultiline-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryu1kn%2Fmultiline-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryu1kn%2Fmultiline-string/lists"}