{"id":15770130,"url":"https://github.com/benbowes/singleline","last_synced_at":"2026-02-08T21:01:40.094Z","repository":{"id":22100837,"uuid":"95305628","full_name":"benbowes/singleline","owner":"benbowes","description":"Convert a multiline string into a single line string, concatenate class-names, minimize html","archived":false,"fork":false,"pushed_at":"2025-12-17T11:07:00.000Z","size":2217,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-20T23:51:03.928Z","etag":null,"topics":["string-manipulation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/benbowes.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-24T15:20:44.000Z","updated_at":"2025-12-17T11:06:57.000Z","dependencies_parsed_at":"2024-10-25T14:50:46.555Z","dependency_job_id":"7c6467d6-0af8-4acb-bd97-a9f1cda62737","html_url":"https://github.com/benbowes/singleline","commit_stats":{"total_commits":23,"total_committers":4,"mean_commits":5.75,"dds":0.4782608695652174,"last_synced_commit":"5a9b3ab41c63ef13812aefd9f083e9342cfdb087"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/benbowes/singleline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbowes%2Fsingleline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbowes%2Fsingleline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbowes%2Fsingleline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbowes%2Fsingleline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbowes","download_url":"https://codeload.github.com/benbowes/singleline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbowes%2Fsingleline/sbom","scorecard":{"id":231538,"data":{"date":"2025-08-11","repo":{"name":"github.com/benbowes/singleline","commit":"03aab4cb4f90b083dd430cf3ebb1665ad655b622"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/benbowes/singleline/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/benbowes/singleline/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/benbowes/singleline/main.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T04:56:54.448Z","repository_id":22100837,"created_at":"2025-08-17T04:56:54.448Z","updated_at":"2025-08-17T04:56:54.448Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29244618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T21:00:43.743Z","status":"ssl_error","status_checked_at":"2026-02-08T20:59:20.374Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["string-manipulation"],"created_at":"2024-10-04T14:22:12.671Z","updated_at":"2026-02-08T21:01:40.074Z","avatar_url":"https://github.com/benbowes.png","language":"TypeScript","readme":"# singleline\n\n![Build status](https://api.travis-ci.org/benbowes/singleline.svg?branch=master)\n\nConvert a multiline string to a single line string\n---\n\n## Getting started\n\nInstall the dependency\n\n`npm install singleline --save-dev`\n\n## React classNames example\n\n```js\nimport singleline from 'singleline';\n\n...\n\u003cdiv\n  className={singleline(`\n    rrs__select-container\n    rrs__select-container--multiselect\n    ${(disabled === true) ? 'rrs__select-container--disabled' : ''}\n    ${(isTouchDevice === true) ? 'rrs__is-touch' : 'rrs__is-desktop'}\n    ${(isOptionsPanelOpen === true) ? 'rrs__options-container--visible' : ''}\n    ${altered ? 'rrs__has-changed': ''}\n  `)}\n\u003e\nSome output\n\u003c/div\u003e\n\n// className=\"rrs__select-container rrs__select-container--multiselect rrs__is-desktop rrs__options-container--visible\"\n```\n\n## Example 2\n\nPassing second parameter in as `true`, removes spaces around the HTML tags but it still respects the spaces in the contents of the tags and attributes.\n\n```js\nimport singleline from 'singleline';\nvar testMultilineHTMLString = singleline(`\n\n  \u003c!DOCTYPE html\u003e\n  \u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n    \u003ctitle\u003eGDD - Giphy Github embed Gif code explorer\u003c/title\u003e\n    \u003clink href=\"css/styleguide.css\" rel=\"stylesheet\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"root\" class=\"root\"\u003e\u003c/div\u003e\n    \u003cscript src=\"app.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n  \u003c/html\u003e\n\n`, true);\n\nconsole.log(testMultilineHTMLString);\n\n// '\u003c!DOCTYPE html\u003e\u003chtml lang=\"en\"\u003e\u003chead\u003e\u003cmeta charset=\"UTF-8\"\u003e\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\u003ctitle\u003eGDD - Giphy Github embed Gif code explorer\u003c/title\u003e\u003clink href=\"css/styleguide.css\" rel=\"stylesheet\"\u003e\u003c/head\u003e\u003cbody\u003e\u003cdiv id=\"root\" class=\"root\"\u003e\u003c/div\u003e\u003cscript src=\"app.js\"\u003e\u003c/script\u003e\u003c/body\u003e\u003c/html\u003e'\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbowes%2Fsingleline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbowes%2Fsingleline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbowes%2Fsingleline/lists"}