# `OctaStar.Scripts`

Script helpers implemented through Datastar element patches.

# `console_log`

```elixir
@spec console_log(Plug.Conn.t(), term(), keyword()) :: Plug.Conn.t()
```

Logs a message in the browser console.

# `execute`

```elixir
@spec execute(Plug.Conn.t(), String.t(), keyword()) :: Plug.Conn.t()
```

Executes JavaScript by appending a `<script>` element to `body`.

# `format_execute`

```elixir
@spec format_execute(
  String.t(),
  keyword()
) :: String.t()
```

Formats an execute-script element patch without writing to a connection.

# `redirect`

```elixir
@spec redirect(Plug.Conn.t(), String.t(), keyword()) :: Plug.Conn.t()
```

Redirects the browser to a URL.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
