Explorer

html-ui.query-param

description
type
Fn(query: String, name: String) -> String
expression
fn(query$0, name$1) =>
  let prefix$2 = @core.string-concat(left: $1, right: "=");
  @core.list-fold(
    T: String,
    A: String,
    reducer: fn(acc$3, item$4) =>
      match @std.string-starts-with(value: $4, prefix: $2) {
        true =>
          @html-ui.url-decode(
            text: @core.string-slice(value: $4, start: @core.string-length(value: $2), end: @core.string-length(value: $4))
          ),
        false =>
          $3
      },
    init: "",
    xs: @core.string-split(text: $0, separator: "&")
  )
visibility
public
html-ui.query-param (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: pRvB5c05Nds5ZmwdN6c_X_1d4fwWPM415hUZ8pVNF2M
content hash: gBjViLNXbdqMkWilqgoZ0tJkBfG5kN5-lZNpYkKtUEk