{"id":19506862,"url":"https://github.com/afsalthaj/safe-string-interpolation","last_synced_at":"2025-04-26T02:33:00.205Z","repository":{"id":43190092,"uuid":"162879774","full_name":"afsalthaj/safe-string-interpolation","owner":"afsalthaj","description":"A type driven approach to string interpolation, aiming at consistent, secure, and only-human-readable logs and console outputs !","archived":false,"fork":false,"pushed_at":"2023-11-11T13:35:34.000Z","size":1278,"stargazers_count":14,"open_issues_count":12,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-29T22:48:41.070Z","etag":null,"topics":["automatic","derviation","fp","functional-programming","interpolation","logging","macros","scala","string","string-manipulation","typeclass","typesafety"],"latest_commit_sha":null,"homepage":"https://afsalthaj.github.io/safe-string-interpolation/","language":"Scala","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/afsalthaj.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-23T09:59:35.000Z","updated_at":"2021-09-12T14:35:32.000Z","dependencies_parsed_at":"2023-12-22T13:03:51.779Z","dependency_job_id":"a22dc5f1-453f-411d-900d-4ae3041d9409","html_url":"https://github.com/afsalthaj/safe-string-interpolation","commit_stats":{"total_commits":153,"total_committers":5,"mean_commits":30.6,"dds":"0.21568627450980393","last_synced_commit":"57894d1af600f831c486538e6167ced17bad762f"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afsalthaj%2Fsafe-string-interpolation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afsalthaj%2Fsafe-string-interpolation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afsalthaj%2Fsafe-string-interpolation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afsalthaj%2Fsafe-string-interpolation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afsalthaj","download_url":"https://codeload.github.com/afsalthaj/safe-string-interpolation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224023707,"owners_count":17242998,"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":["automatic","derviation","fp","functional-programming","interpolation","logging","macros","scala","string","string-manipulation","typeclass","typesafety"],"created_at":"2024-11-10T22:38:47.149Z","updated_at":"2024-11-10T22:38:47.912Z","avatar_url":"https://github.com/afsalthaj.png","language":"Scala","readme":"## Typesafe Interpolation\n\n[![Build Status](https://travis-ci.com/afsalthaj/safe-string-interpolation.svg?branch=master)](https://travis-ci.com/afsalthaj/safe-string-interpolation)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/safe-string-interpolation/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.afsalthaj/safe-string-interpolation_2.12.svg)](https://search.maven.org/artifact/io.github.afsalthaj/safe-string-interpolation_2.13/2.1.3/jar)\n\n\nAn insanely simple type driven approach to string interpolation, aiming at consistent, secure,  and only-human-readable logs and console outputs, and for safe string operations ! \n\n```scala\n@ import $ivy.`io.github.afsalthaj::safe-string-interpolation:2.1.3`\nimport $ivy.$\n\n@ import com.thaj.safe.string.interpolator._\nimport com.thaj.safe.string.interpolator._\n\n@ case class Port(int: Int) extends AnyVal\ndefined class Port\n\n@ val port = Port(1)\nport: Port = Port(1)\n\n@ ss\"Db details: Port is ${port}\"\ncmd7.sc:1: could not find implicit value for parameter ev: com.thaj.safe.string.interpolator.Safe[ammonite.$sess.cmd5.Port]\nval res7 = ss\"Db details: Port is ${port}\"\n           ^\nCompilation Failed\n\n@ ss\"Db details: Port is ${port.int}\"\nres7: SafeString = SafeString(\"Db details: Port is 1\")\n\n// Another example\n@ case class Prefix(value: String) \ndefined class Prefix\n\n@ case class BucketName(value: String) \ndefined class BucketName\n\n@ val prefix = Prefix(\"foo\") \nprefix: Prefix = Prefix(\"foo\")\n\n@ val bucketName = BucketName(\"6666-bucket\") \nbucketName: BucketName = BucketName(\"6666-bucket\")\n\n@ val path = s\"${bucketName}/${prefix}\" \npath: String = \"BucketName(6666-bucket)/Prefix(foo)\"\n\n@ val path = ss\"${bucketName}/${prefix}\" \ncmd7.sc:1: could not find implicit value for parameter ev: com.thaj.safe.string.interpolator.Safe[ammonite.$sess.cmd2.BucketName]\nval path = ss\"${bucketName}/${prefix}\"\n           ^\nCompilation Failed\n\n\n// Autoderivation module\n@ import instances._\nimport instances._\n\n@ ss\"Db details: Port is ${port}\"\nres9: SafeString = SafeString(\"Db details: Port is { int : 1 }\")\n\n\n```\nCheckout the project [website](https://afsalthaj.github.io/safe-string-interpolation/) for more features and possibilities.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafsalthaj%2Fsafe-string-interpolation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafsalthaj%2Fsafe-string-interpolation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafsalthaj%2Fsafe-string-interpolation/lists"}