{"id":15883874,"url":"https://github.com/ticky/literal-toast","last_synced_at":"2025-03-20T07:30:57.963Z","repository":{"id":38274509,"uuid":"71427987","full_name":"ticky/literal-toast","owner":"ticky","description":"🍞 Combines template literal values so you don’t have to","archived":false,"fork":false,"pushed_at":"2024-10-04T22:33:54.000Z","size":650,"stargazers_count":3,"open_issues_count":18,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2024-10-07T04:41:24.944Z","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/ticky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-10-20T05:22:47.000Z","updated_at":"2024-06-14T03:18:54.000Z","dependencies_parsed_at":"2023-01-25T14:46:22.863Z","dependency_job_id":"6e2cb75c-0fc7-47a4-acc6-bcd781f63cde","html_url":"https://github.com/ticky/literal-toast","commit_stats":{"total_commits":81,"total_committers":3,"mean_commits":27.0,"dds":"0.16049382716049387","last_synced_commit":"ffe4916b31eb6df42861bb0d485482f3fb6b1f37"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fliteral-toast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fliteral-toast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fliteral-toast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fliteral-toast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ticky","download_url":"https://codeload.github.com/ticky/literal-toast/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244570584,"owners_count":20474094,"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-06T04:41:23.655Z","updated_at":"2025-03-20T07:30:52.939Z","avatar_url":"https://github.com/ticky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍞 Literal Toast\n[![npm](https://img.shields.io/npm/v/literal-toast.svg?maxAge=2592000)](https://www.npmjs.com/package/literal-toast) ![literal-toast](https://img.shields.io/npm/l/literal-toast.svg?maxAge=2592000)  [![Build Status](https://travis-ci.org/ticky/literal-toast.svg?branch=develop)](https://travis-ci.org/ticky/literal-toast) [![codecov](https://codecov.io/gh/ticky/literal-toast/branch/develop/graph/badge.svg)](https://codecov.io/gh/ticky/literal-toast)\n\nHelper for making template literal tags; combines template literal values so you don't have to\n\n## Wait, what ⁉️\n\n[Tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals) are a feature of ES6/ES2015 which allows processing of template literals (template strings).\n\nThis is a little helper for zipping the literals and substitutions so your tag can operate on or return the final value of the template string without reimplementing this logic itself.\n\n## Usage\n\nSpread the literals and substitutions from the template literal onto `literalToast`;\n\n```javascript\nimport literalToast from 'literal-toast';\n\nfunction lineReverse(literals, ...substitutions) {\n  return literalToast(literals, ...substitutions)\n    .split('\\n')\n    .reverse()\n    .join('\\n');\n}\n\nlineReverse`but it demonstrates what this does pretty simply.\nThis is a weird example,`;\n\n// Returns:\n// \"This is a weird example,\n//  but it demonstrates what this does pretty simply.\"\n\n```\n\nThe above example shows both the literals and substitutions for clarity, but if you don't use either parameter yourself, you can write it like this instead;\n\n```javascript\nfunction myTag(...literalValues) {\n  return literalToast(...literalValues) // your logic here\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticky%2Fliteral-toast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fticky%2Fliteral-toast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticky%2Fliteral-toast/lists"}