Current section
Files
Jump to
Current section
Files
src/ffi.mjs
import { Error, Ok } from "../prelude.mjs"
export function get(object, attribute) {
const value = object[attribute];
if (value) return new Ok(value)
return new Error(undefined)
}
export function get_attr(attribute) {
return (args) => {
return Object[attribute](...args)
}
}