Module Jv.JstrSource

Jstr object properties.

Sourceval 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.

Sourceval 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.

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

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

Sourceval 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).

Sourcetype t = Jstr.t

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