WebAssembly.Tools.Input

Summary

htmlize_attributes(attrs)

Turn a keyword list of attributes to an list of attribute framgents in a format used by html

Functions

htmlize_attributes(attrs)

Specs:

Turn a keyword list of attributes to an list of attribute framgents in a format used by html.

Underscores in key names are turned into dash signs.

Examples

iex> WebAssembly.Tools.Input.htmlize_attributes(class: "light", id: :myid)
["class=\"light\"", " ", "id=\"myid\""]

iex> WebAssembly.Tools.Input.htmlize_attributes(http_equiv: "Content-Type")
["http-equiv=\"Content-Type\""]