{"id":16859504,"url":"https://github.com/cowboy/node-heredoc-tag","last_synced_at":"2025-06-18T02:35:37.421Z","repository":{"id":57262835,"uuid":"50191119","full_name":"cowboy/node-heredoc-tag","owner":"cowboy","description":"Heredoc helpers for ES2015 template strings","archived":false,"fork":false,"pushed_at":"2016-01-22T18:11:56.000Z","size":13,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-02T22:35:54.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cowboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-22T15:56:11.000Z","updated_at":"2025-02-10T05:47:48.000Z","dependencies_parsed_at":"2022-09-01T06:31:00.915Z","dependency_job_id":null,"html_url":"https://github.com/cowboy/node-heredoc-tag","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cowboy/node-heredoc-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowboy%2Fnode-heredoc-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowboy%2Fnode-heredoc-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowboy%2Fnode-heredoc-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowboy%2Fnode-heredoc-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cowboy","download_url":"https://codeload.github.com/cowboy/node-heredoc-tag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cowboy%2Fnode-heredoc-tag/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260339617,"owners_count":22994314,"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-10-13T14:18:01.938Z","updated_at":"2025-06-18T02:35:32.410Z","avatar_url":"https://github.com/cowboy.png","language":"JavaScript","readme":"# heredoc-tag\n\n\u003e Heredoc helpers for ES2015 template strings\n\n[![Build Status](https://travis-ci.org/cowboy/node-heredoc-tag.svg?branch=master)](https://travis-ci.org/cowboy/node-heredoc-tag)\n[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)\n\n## Installation\n\n```\nnpm install heredoc-tag\n```\n\n## Examples\n\n_(Taken from the [examples](examples/examples.js) file)_\n\n```js\nimport heredoc from 'heredoc-tag';\nlet str;\n\n\n// Trim\nstr = heredoc.trim`\n\nthis is a test\n\n`;\nconsole.log(`\"${str}\"`); // \"this is a test\"\n\n\n// Remove newlines\nstr = heredoc.oneline`\n  Here is a sentence\n  split across\n  multiple lines.\n`;\nconsole.log(`\"${str}\"`); // \"  Here is a sentence  split across  multiple lines.\"\n\n\n// Remove newlines, trim each line, then join lines with a space\nstr = heredoc.oneline.trim`\n  Here is a sentence\n  split across\n  multiple lines.\n`;\nconsole.log(`\"${str}\"`); // \"Here is a sentence split across multiple lines.\"\n\n\n// Unindent as far as possible\nstr = heredoc.unindent`\n      This is an example\n        where some text is indented more\n      and some text is indented less\n    for whatever reason.\n`;\nconsole.log(`\"${str}\"`);\n// \"\n//   This is an example\n//     where some text is indented more\n//   and some text is indented less\n// for whatever reason.\n// \"\n\n\n// Unindent, trim the ends of lines, trim leading/trailing whitespace\nstr = heredoc.unindent.trim`\n      This is an example\n        where some text is indented more\n      and some text is indented less\n    for whatever reason.\n`;\nconsole.log(`\"${str}\"`);\n// \"  This is an example\n//     where some text is indented more\n//   and some text is indented less\n// for whatever reason.\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcowboy%2Fnode-heredoc-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcowboy%2Fnode-heredoc-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcowboy%2Fnode-heredoc-tag/lists"}