Zach Klippenstein (he/him) [MOD]
11/03/2023, 6:56 PMZach Klippenstein (he/him) [MOD]
11/03/2023, 6:58 PMinputTransformation = maxLengthInChars(6)
.then(allCaps(Locale.current))
where you can define your own transformations as
fun allCaps(…): InputTransformation = …
Zach Klippenstein (he/him) [MOD]
11/03/2023, 6:58 PMinputTransformation = InputTransformation
.maxLengthInChars(6)
.allCaps(Locale.current)
where you define your own transformations as
fun InputTransformation.allCaps(…): InputTransformation =
this.then(…)
Zach Klippenstein (he/him) [MOD]
11/03/2023, 7:00 PMModifier
style, and requires a bit more ceremony to write custom transformations but is cleaner to use.
1 is simpler to write custom transformations, but harder to discover (no auto-complete) and more verbose to useZach Klippenstein (he/him) [MOD]
11/03/2023, 7:01 PMInputTransformation.Companion
, which is kind of the worst. Forces you to write InputTransformation.
before every one, even within the same chain.annsofi
11/03/2023, 7:08 PMefemoney
11/03/2023, 7:50 PMDario Ahdoot
11/03/2023, 8:35 PMZach Klippenstein (he/him) [MOD]
11/03/2023, 8:41 PMsaket
11/08/2023, 12:23 AM1
because the chaining of transformations with then()
makes it clear that they're applied in order, but I immediately remembered that 2
matches how we think of reactive operators and modifiers