lotta

package with maybe a lotta javascript stuff to use with Gleam

Package Version Hex Docs

Quick start

import lotta/object
import gleam/dynamic
import gleam/result
import gleam/io

pub fn main() {
   let item = get_from_js(...)
   let assert Ok(obj) = object.to_object(item)
   let Ok(name) = object.get(obj, "name")
     |> result.try(dynamic.string)
   io.println("hello, " <> name)
}

Installation

If available on Hex this package can be added to your Gleam project:

gleam add lotta

and its documentation can be found at https://hexdocs.pm/lotta.

Search Document