package prr

  1. Overview
  2. Docs

Jstr object properties.

val find : t -> prop -> Jstr.t option

find o p is find_map of_jstr Jv.find o p. This is unsafe, only use if you know that if o defines p it is guaranteed to be a JavaScript string.

val get : t -> prop -> Jstr.t

get o p is of_jv (Jv.get o p). This is unsafe, only use if you know o has p and it is guaranteed to be a JavaScript string.

val set : t -> prop -> Jstr.t -> unit

set o p b is Jv.set o p (to_jv b).

val set_if_some : t -> prop -> Jstr.t option -> unit

set_if_some o p b is Jv.set_if_some o p (Option.map to_jv b).

type t = Jstr.t

Just here because we can't refer to the outer Jstr after this module definition.

OCaml

Innovation. Community. Security.