Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make tethys.FieldStyle companion non private #328

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/core/src/main/scala-3/tethys/FieldStyle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum FieldStyle {
case SnakeCase, LowerSnakeCase, UpperSnakeCase, CapitalizedSnakeCase
}

private[tethys] object FieldStyle:
object FieldStyle:
private val regexp1: Pattern = Pattern.compile("([A-Z]+)([A-Z][a-z])")
private val regexp2: Pattern = Pattern.compile("([a-z\\d])([A-Z])")
private val replacement: String = "$1_$2"
Expand All @@ -22,7 +22,7 @@ private[tethys] object FieldStyle:
private val lowercase: String => String = _.toLowerCase()
private val uppercase: String => String = _.toUpperCase()

def applyStyle(string: String, style: FieldStyle): String =
private[tethys] def applyStyle(string: String, style: FieldStyle): String =
style match
case FieldStyle.Capitalize => capitalize(string)
case FieldStyle.Uncapitalize => uncapitalize(string)
Expand Down