{"id":17817991,"url":"https://github.com/kjirou/ansi-styles-template","last_synced_at":"2026-04-28T08:32:24.326Z","repository":{"id":47452336,"uuid":"115630648","full_name":"kjirou/ansi-styles-template","owner":"kjirou","description":"Use ANSI styles in template notation","archived":false,"fork":false,"pushed_at":"2021-08-31T07:19:09.000Z","size":7,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T12:56:45.781Z","etag":null,"topics":["ansi","ansi-colors","node-module","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ansi-styles-template","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/kjirou.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-12-28T14:26:09.000Z","updated_at":"2025-02-20T17:12:53.000Z","dependencies_parsed_at":"2022-09-14T03:31:59.419Z","dependency_job_id":null,"html_url":"https://github.com/kjirou/ansi-styles-template","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kjirou/ansi-styles-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjirou%2Fansi-styles-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjirou%2Fansi-styles-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjirou%2Fansi-styles-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjirou%2Fansi-styles-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kjirou","download_url":"https://codeload.github.com/kjirou/ansi-styles-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjirou%2Fansi-styles-template/sbom","scorecard":{"id":562343,"data":{"date":"2025-08-11","repo":{"name":"github.com/kjirou/ansi-styles-template","commit":"400247431f9f3edd0f8b64cba8f6816ce22baf2a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/7 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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-20T14:04:49.073Z","repository_id":47452336,"created_at":"2025-08-20T14:04:49.073Z","updated_at":"2025-08-20T14:04:49.073Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32373498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ansi","ansi-colors","node-module","nodejs"],"created_at":"2024-10-27T16:47:05.861Z","updated_at":"2026-04-28T08:32:24.302Z","avatar_url":"https://github.com/kjirou.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansi-styles-template\n\n[![npm version](https://badge.fury.io/js/ansi-styles-template.svg)](https://badge.fury.io/js/ansi-styles-template)\n[![Build Status](https://travis-ci.org/kjirou/ansi-styles-template.svg?branch=master)](https://travis-ci.org/kjirou/ansi-styles-template)\n\nUse ANSI styles in template notation\n\n\n## Installation\n\n```bash\nnpm install ansi-styles-template\n```\n\n\n## Usage\n### Basic usage\n\n```js\nconst {template} = require('ansi-styles-template');\n\nconst str = '{red}Bloody..{/red}';\n\nconsole.log(template(str));  // -\u003e \"\\u001b[31mBloody..\\u001b[39m\"\n```\n\n### Built-in styles\n\nThe styles available as tags conform to [ansy-styles](https://github.com/chalk/ansi-styles).\n\nOr dump `replacementMap` in the following way, you can confirm more certainly.\n\n```js\nconst {replacementMap} = require('ansi-styles-template');\n\nconsole.log(replacementMap);\n// -\u003e\n//   Map {\n//     'reset' =\u003e { opener: '\\u001b[0m', closer: '\\u001b[0m' },\n//     'bold' =\u003e { opener: '\\u001b[1m', closer: '\\u001b[22m' },\n//     'dim' =\u003e { opener: '\\u001b[2m', closer: '\\u001b[22m' },\n//     'italic' =\u003e { opener: '\\u001b[3m', closer: '\\u001b[23m' },\n//     'underline' =\u003e { opener: '\\u001b[4m', closer: '\\u001b[24m' },\n//     'inverse' =\u003e { opener: '\\u001b[7m', closer: '\\u001b[27m' },\n//     'hidden' =\u003e { opener: '\\u001b[8m', closer: '\\u001b[28m' },\n//     'strikethrough' =\u003e { opener: '\\u001b[9m', closer: '\\u001b[29m' },\n//     'black' =\u003e { opener: '\\u001b[30m', closer: '\\u001b[39m' },\n//     'red' =\u003e { opener: '\\u001b[31m', closer: '\\u001b[39m' },\n//     'green' =\u003e { opener: '\\u001b[32m', closer: '\\u001b[39m' },\n//     'yellow' =\u003e { opener: '\\u001b[33m', closer: '\\u001b[39m' },\n//     'blue' =\u003e { opener: '\\u001b[34m', closer: '\\u001b[39m' },\n//     'magenta' =\u003e { opener: '\\u001b[35m', closer: '\\u001b[39m' },\n//     'cyan' =\u003e { opener: '\\u001b[36m', closer: '\\u001b[39m' },\n//     'white' =\u003e { opener: '\\u001b[37m', closer: '\\u001b[39m' },\n//     'gray' =\u003e { opener: '\\u001b[90m', closer: '\\u001b[39m' },\n//     'redBright' =\u003e { opener: '\\u001b[91m', closer: '\\u001b[39m' },\n//     'greenBright' =\u003e { opener: '\\u001b[92m', closer: '\\u001b[39m' },\n//     'yellowBright' =\u003e { opener: '\\u001b[93m', closer: '\\u001b[39m' },\n//     'blueBright' =\u003e { opener: '\\u001b[94m', closer: '\\u001b[39m' },\n//     'magentaBright' =\u003e { opener: '\\u001b[95m', closer: '\\u001b[39m' },\n//     'cyanBright' =\u003e { opener: '\\u001b[96m', closer: '\\u001b[39m' },\n//     'whiteBright' =\u003e { opener: '\\u001b[97m', closer: '\\u001b[39m' },\n//     'bgBlack' =\u003e { opener: '\\u001b[40m', closer: '\\u001b[49m' },\n//     'bgRed' =\u003e { opener: '\\u001b[41m', closer: '\\u001b[49m' },\n//     'bgGreen' =\u003e { opener: '\\u001b[42m', closer: '\\u001b[49m' },\n//     'bgYellow' =\u003e { opener: '\\u001b[43m', closer: '\\u001b[49m' },\n//     'bgBlue' =\u003e { opener: '\\u001b[44m', closer: '\\u001b[49m' },\n//     'bgMagenta' =\u003e { opener: '\\u001b[45m', closer: '\\u001b[49m' },\n//     'bgCyan' =\u003e { opener: '\\u001b[46m', closer: '\\u001b[49m' },\n//     'bgWhite' =\u003e { opener: '\\u001b[47m', closer: '\\u001b[49m' },\n//     'bgBlackBright' =\u003e { opener: '\\u001b[100m', closer: '\\u001b[49m' },\n//     'bgRedBright' =\u003e { opener: '\\u001b[101m', closer: '\\u001b[49m' },\n//     'bgGreenBright' =\u003e { opener: '\\u001b[102m', closer: '\\u001b[49m' },\n//     'bgYellowBright' =\u003e { opener: '\\u001b[103m', closer: '\\u001b[49m' },\n//     'bgBlueBright' =\u003e { opener: '\\u001b[104m', closer: '\\u001b[49m' },\n//     'bgMagentaBright' =\u003e { opener: '\\u001b[105m', closer: '\\u001b[49m' },\n//     'bgCyanBright' =\u003e { opener: '\\u001b[106m', closer: '\\u001b[49m' },\n//     'bgWhiteBright' =\u003e { opener: '\\u001b[107m', closer: '\\u001b[49m' } }\n```\n\n\n## API\n### template(str, options = {})\n#### Arguments\n\n- `str: string`\n  - A string to be replaced\n- `options.leftBrace: string`\n  - Default: `\"{\"`\n- `options.rightBrace: string`\n  - Default: `\"}\"`\n- `options.strict: boolean`\n  - Default: `false`\n  - Whether to throw an error if an unknown tag matches\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjirou%2Fansi-styles-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjirou%2Fansi-styles-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjirou%2Fansi-styles-template/lists"}