Packages

Run you Gleam programs on Cloudflare's 'World Computer'/Developer Platform

Current section

Files

Jump to
plinth_cloudflare src plinth cloudflare utils.gleam
Raw

src/plinth/cloudflare/utils.gleam

import gleam/json
import gleam/list
pub fn sparse(entries: List(#(String, json.Json))) -> json.Json {
list.filter(entries, fn(entry) {
let #(_, v) = entry
v != json.null()
})
|> json.object
}