{"id":17262846,"url":"https://github.com/jpwilliams/sindent","last_synced_at":"2025-03-26T10:24:53.510Z","repository":{"id":57361658,"uuid":"98632558","full_name":"jpwilliams/sindent","owner":"jpwilliams","description":"Remove indentation from template literals using template tags.","archived":false,"fork":false,"pushed_at":"2020-01-06T09:13:34.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T13:54:24.418Z","etag":null,"topics":["indent","literals","spaces","string","tabs","tags","template"],"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/jpwilliams.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":"2017-07-28T09:18:51.000Z","updated_at":"2021-06-24T10:18:30.000Z","dependencies_parsed_at":"2022-09-06T22:21:26.307Z","dependency_job_id":null,"html_url":"https://github.com/jpwilliams/sindent","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/jpwilliams%2Fsindent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpwilliams%2Fsindent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpwilliams%2Fsindent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpwilliams%2Fsindent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpwilliams","download_url":"https://codeload.github.com/jpwilliams/sindent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245633857,"owners_count":20647467,"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":["indent","literals","spaces","string","tabs","tags","template"],"created_at":"2024-10-15T07:54:51.921Z","updated_at":"2025-03-26T10:24:53.486Z","avatar_url":"https://github.com/jpwilliams.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sindent\nRemove indentation from string literals in a predictable manner using template tags.\n\n``` js\nconst sindent = require('sindent')\n\nsindent`This string\n  should only indent\n    right here\n  but nowhere else,\n  as it's obvious we don't want\n  the other indentations`\n\n// This string\n// should only indent\n//   right here\n// but nowhere else\n// as it's obvious we don't want\n// the other indentations\n```\n\n## Greedy mode\n\nThis \"mode\" makes the internal regex nice and hungry, so it'll accept an indentation of 0 as the smallest it finds.\nThis isn't _usually_ what you want, but it fits certain cases.\n\n``` js\nconst sindent = require('sindent/greedy')\n\nsindent`This line will be matched as the smallest,\n  so this line will be indented`\n\n// This line will be matched as the smallest\n//   so this line will be indented\n```\n\n## Function mode\n\nIf you don't want to use template tags, you can also use _sindent_ as a normal function, accepting `str` and `greedy`.\n\n``` js\nconst sindent = require('sindent/func')\n\nsindent(`Let's start\n  a greedy,\n    greedy\nindent`, true)\n\n// Let's start\n//   a greedy\n//     greedy\n// indent\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpwilliams%2Fsindent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpwilliams%2Fsindent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpwilliams%2Fsindent/lists"}