All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elm.recordEncoder.mustache Maven / Gradle / Ivy

There is a newer version: 7.10.0
Show newest version
encode : {{classname}} -> Encode.Value
encode =
    Encode.object << encodePairs


encodeWithTag : ( String, String ) -> {{classname}} -> Encode.Value
encodeWithTag (tagField, tag) model =
    Encode.object <| encodePairs model ++ [ ( tagField, Encode.string tag ) ]


encodePairs : {{classname}} -> List (String, Encode.Value)
encodePairs model =
{{#allVars}}
    {{#-first}}[{{/-first}}{{^-first}},{{/-first}} {{>recordFieldEncoder}}
{{/allVars}}
    ]




© 2015 - 2025 Weber Informatics LLC | Privacy Policy