{"id":16396355,"url":"https://github.com/clhenrick/single-line-string","last_synced_at":"2025-10-26T14:31:18.036Z","repository":{"id":57361689,"uuid":"77390251","full_name":"clhenrick/single-line-string","owner":"clhenrick","description":"Simple tag function that converts multiline ES6 template literals to a single line string \u0026 removes extra whitespace. Requires a javascript environment that supports template literals.","archived":false,"fork":false,"pushed_at":"2017-04-28T00:23:05.000Z","size":4,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T20:43:58.787Z","etag":null,"topics":["es2015","es6","es6-javascript","template-literals"],"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/clhenrick.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}},"created_at":"2016-12-26T14:54:11.000Z","updated_at":"2021-12-21T01:21:19.000Z","dependencies_parsed_at":"2022-09-26T16:41:02.700Z","dependency_job_id":null,"html_url":"https://github.com/clhenrick/single-line-string","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clhenrick%2Fsingle-line-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clhenrick%2Fsingle-line-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clhenrick%2Fsingle-line-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clhenrick%2Fsingle-line-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clhenrick","download_url":"https://codeload.github.com/clhenrick/single-line-string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238347680,"owners_count":19456970,"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":["es2015","es6","es6-javascript","template-literals"],"created_at":"2024-10-11T05:07:09.725Z","updated_at":"2025-10-26T14:31:17.712Z","avatar_url":"https://github.com/clhenrick.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single Line String\nSimple tag function that converts a multiline ES6 template literal to a single line\nstring, removing extra whitespace. Requires a javascript environment that supports \n[es6 template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)\n(eg: Node \u003e= 4.7.0).\n\n## Usage\nES6\n\n```javascript\nimport sls from 'single-line-string';\n\nvar name = 'June';\nconst hello = sls`\n  Hey,\n        hello,\n  how\n    are\n              you\n  ${name}?\n`\n\nconsole.log(hello); // outputs: \"Hey, hello, how are you June?\"\n```\n\nor via Common JS\n\n```javascript\nvar sls = require('single-line-string');\nvar name = 'June';\nvar hello = sls`\n  Hey,\n        hello,\n  how\n    are\n              you\n  ${name}?\n`;\n\nconsole.log(hello); // outputs: \"Hey, hello, how are you June?\"\n```\n\n## Install\n`npm install single-line-string`\n\n## Build\n`npm install \u0026\u0026 npm run build`\n\n## Test\n`npm run test`\n\n## Credits\ncode credit: https://muffinresearch.co.uk/removing-leading-whitespace-in-es6-template-strings/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclhenrick%2Fsingle-line-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclhenrick%2Fsingle-line-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclhenrick%2Fsingle-line-string/lists"}