{"id":38621692,"url":"https://github.com/tgrassl/sweet-syntax","last_synced_at":"2026-01-18T13:42:22.558Z","repository":{"id":57376048,"uuid":"218381730","full_name":"tgrassl/sweet-syntax","owner":"tgrassl","description":"Add syntactic sugar to any language!","archived":false,"fork":false,"pushed_at":"2020-02-07T21:58:25.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T06:03:44.731Z","etag":null,"topics":["arnold","code-style","custom-syntax","emoji","markdown","sugar","sweet","syntax"],"latest_commit_sha":null,"homepage":"","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/tgrassl.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":"2019-10-29T20:54:21.000Z","updated_at":"2023-03-07T08:22:51.000Z","dependencies_parsed_at":"2022-09-14T17:02:09.385Z","dependency_job_id":null,"html_url":"https://github.com/tgrassl/sweet-syntax","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tgrassl/sweet-syntax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrassl%2Fsweet-syntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrassl%2Fsweet-syntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrassl%2Fsweet-syntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrassl%2Fsweet-syntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tgrassl","download_url":"https://codeload.github.com/tgrassl/sweet-syntax/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgrassl%2Fsweet-syntax/sbom","scorecard":{"id":876145,"data":{"date":"2025-08-11","repo":{"name":"github.com/tgrassl/sweet-syntax","commit":"1943fe1e36cba107be648322421328ffe4999583"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-24T06:04:40.410Z","repository_id":57376048,"created_at":"2025-08-24T06:04:40.410Z","updated_at":"2025-08-24T06:04:40.410Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28531993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["arnold","code-style","custom-syntax","emoji","markdown","sugar","sweet","syntax"],"created_at":"2026-01-17T08:54:05.010Z","updated_at":"2026-01-18T13:42:22.542Z","avatar_url":"https://github.com/tgrassl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://i.ibb.co/K07Fh6c/sweet-syntax-banner.png)\n\n[![npm](https://flat.badgen.net/npm/v/sweet-syntax)](https://www.npmjs.com/package/sweet-syntax)\n[![install size](https://flat.badgen.net/packagephobia/install/sweet-syntax)](https://packagephobia.now.sh/result?p=sweet-syntax)\n\nAdd syntactic sugar to any language!\n\n## Install \nInstall `sweet-syntax` globally using npm:\n\n```bash\nnpm install sweet-syntax -g\n```\n\n## Usage \nOnce the installation is done, you can run the command inside your project's directory with your input and output file.\n\n```bash\nsweet-syntax input.myts output.ts\n```\n\nBy default `sweet-syntax` will search the root of the current directory for a `sweet-syntax.json` file that contains your syntax configuration.\n\nIf the config file is located somewhere else, use the `--config` or `-c` argument with its path.\n\n```bash\nsweet-syntax input.myjs output.js -c configs/sweet-syntax.json\n```\n\nFinally, run this command to see a list of all available options:\n\n```bash\nsweet-syntax --help\n```\n\n### As a loadable module\n\nYou can also use `sweet-syntax` as a module in your code.  \nFirst install it locally using npm:\n\n```bash\nnpm install --save sweet-syntax\n```\n\nThen `require` and use it in your code:\n\n```javascript\nconst sweetSyntax = require('sweet-syntax');\nconst config = {\n    objects: {\n       HELLO: 'console.log'\n    },\n    keywords: {\n        END: ';'\n    }\n}\nconst input = 'HELLO(\"Hello World\")END';\nconst output = sweetSyntax.sweeten(config, input);\n\nconsole.log(output);\n\n// Output:\n// console.log(\"Hello World\");\n```\n\n## Config\nThe config file should be named `sweet-syntax.json` and adopt the following structure:\n\n```\n{\n    \"keywords\": {\n        \"LOOP\": \"for\",\n        \"CHECK\": \"if\",\n        ...\n    },\n    \"objects\": {\n        \"LOG\": \"console.log\",\n        ... \n    },\n    \"operators\": {\n        \"EQL\": \"===\",\n        \"NQL\": \"!==\",\n        ...\n    },\n    \"characters\": {\n        \"{{\": \"\",\n        \"}}\": \"\",\n        ...\n    }\n}\n```\n\nAt least one object e.g. keywords must be provided by the config.\n\n\n## Examples\nYou can see examples of custom syntactic sugar under the examples folder:\n* [Emoji Markdown](https://github.com/tgrassl/sweet-syntax/tree/master/examples/emojiMarkdown)\n* [ArnoldJS](https://github.com/tgrassl/sweet-syntax/tree/master/examples/arnoldJS)\n\n## License\nCode released under the [MIT License](https://github.com/tgrassl/sweet-syntax/blob/master/LICENSE).\n\nEnjoy ⭐️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgrassl%2Fsweet-syntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftgrassl%2Fsweet-syntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgrassl%2Fsweet-syntax/lists"}