Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Index of values


_JSON [Js]

JSON object

_false [Js]

Javascript false boolean.

_true [Js]

Javascript true boolean.


A
arguments [Url.​Current]

The arguments of the current url as an association list.

array [Js]

Conversion of arrays from OCaml to Javascript.

array_empty [Js]

Constructor of Array objects.

array_get [Js]

Array access: array_get a i returns the element at index i of array a.

array_length [Js]

Constructor of Array objects.

array_map [Js]

Array map: array_map f a is a##map(wrap_callback (fun elt idx arr -> f elt)).

array_mapi [Js]

Array mapi: array_mapi f a is a##map(wrap_callback (fun elt idx arr -> f idx elt)).

array_set [Js]

Array update: array_set a i v puts v at index i in array a.

as_string [Url.​Current]

as_string is the original string representation of the current Url.


B
bind [Js.​OPT]

Apply a function returning an optional value to an optional value

bool [Js]

Conversion of booleans from OCaml to Javascript.

bounded_split [Regexp]

bounded_split r s i is like split r s except that the result's length is less than i.

bytestring [Js]

Conversion of strings of bytes from OCaml to Javascript.


C
call [Lwt_jsonp]

call ~timeout ~param url do a jsonp call using url.

call [Js.​Unsafe]

Performs a Javascript function call.

call_custom_url [Lwt_jsonp]

call_custom_url ~timeout make_url.

callback [Js.​Unsafe]

Wrap an OCaml function so that it can be invoked from Javascript.

callback_with_arguments [Js.​Unsafe]

Wrap an OCaml function so that it can be invoked from Javascript.

callback_with_arity [Js.​Unsafe]
case [Js.​OPT]

Pattern matching on optional values.

coerce [Js.​Unsafe]

Unsafe coercion between to Javascript objects.

coerce [Js]

Apply a possibly failing coercion function.

coerce_opt [Js]

Apply a possibly failing coercion function.

console [Lwt_log_js]

Logger that use the javascript console object.

create_file [Sys_js]

Register a file to a Pseudo Filesystem.


D
date [Js]

The date constructor, as an object.

date_day [Js]

Constructor of Date objects: jsnew date_fromTimeValue (y, m, d) returns a Date object corresponding to year y, month m and day d.

date_fromTimeValue [Js]

Constructor of Date objects: jsnew date_fromTimeValue (t) returns a Date object initialized with the time value t.

date_hour [Js]

Constructor of Date objects: jsnew date_fromTimeValue (y, m, d, h) returns a Date object corresponding to year y to hour h.

date_min [Js]

Constructor of Date objects: jsnew date_fromTimeValue (y, m, d, h, m') returns a Date object corresponding to year y to minute m'.

date_month [Js]

Constructor of Date objects: jsnew date_fromTimeValue (y, m) returns a Date object corresponding to year y and month m.

date_ms [Js]

Constructor of Date objects: jsnew date_fromTimeValue (y, m, d, h, m', s, ms) returns a Date object corresponding to year y to millisecond ms.

date_now [Js]

Constructor of Date objects: jsnew date_now () returns a Date object initialized with the current date.

date_sec [Js]

Constructor of Date objects: jsnew date_fromTimeValue (y, m, d, h, m', s) returns a Date object corresponding to year y to second s.

debug [Lwt_log_js]
debug_f [Lwt_log_js]
debugger [Js]

Invokes any available debugging functionality.

decodeURI [Js]

Decode a URI: replace by the corresponding byte all escape sequences but the ones corresponding to a URI reserved character and convert the string from UTF-8 to UTF-16.

decodeURIComponent [Js]

Decode a URIComponent: replace all escape sequences by the corresponding byte and convert the string from UTF-8 to UTF-16.

decode_arguments [Url]

decode_arguments s parses s returning the sliced-diced association list.

def [Js]

Consider a value into a possibly undefined value.

default_http_port [Url]

The default port for Http communications (80).

default_https_port [Url]

The default port for Https communications (443).

delete [Js.​Unsafe]

Delete an object property.

dispatcher [Ocamlbuild_js_of_ocaml]

The main dispatcher


E
empty [Js.​OPT]

No value.

encodeURI [Js]

Encode a URI: convert the string to UTF-8 and replace all unsafe bytes by the corresponding escape sequence.

encodeURIComponent [Js]

Same as encodeURI, but also encode URI reserved characters.

encode_arguments [Url]

encode_arguments a expects a list of pair of values of the form (name,value) were name is the name of an argument and value it's associated value.

error [Lwt_log_js]
error_constr [Js]

Constructor of Error objects: jsnew error_constr (msg) returns an Error object with the message msg.

error_f [Lwt_log_js]
escape [Js]

Escape a string: unsafe UTF-16 code points are replaced by 2-digit and 4-digit escape sequences.

eval_string [Js.​Unsafe]

Evaluate Javascript code

execute [JsooTop]

execute print fmt content Execute content.

export [Js]

export name value export name

export_all [Js]

export_all obj export every key of obj object.


F
fatal [Lwt_log_js]
fatal_f [Lwt_log_js]
float [Js]

Conversion of OCaml floats to Javascript numbers.

float_of_number [Js]

Conversion of Javascript number objects to OCaml floats.

fun_call [Js.​Unsafe]

Performs a Javascript function call.


G
get [Url.​Current]

get () returns a value of type Url.​url with fields reflecting the state of the current Url.

get [Js.​Unsafe]

Get the value of an object property.

get [Js.​OPT]

Get the value.

get_fragment [Url.​Current]

Because the fragment of the Url for the current document can change dynamically, we use a functional value here.

global [Js.​Unsafe]

Javascript global object

global_replace [Regexp]

global_replace r s by replaces all of the matches of r in s by by.


H
host [Url.​Current]

The host part of the current url.


I
ign_debug [Lwt_log_js]
ign_debug_f [Lwt_log_js]
ign_error [Lwt_log_js]
ign_error_f [Lwt_log_js]
ign_fatal [Lwt_log_js]
ign_fatal_f [Lwt_log_js]
ign_info [Lwt_log_js]
ign_info_f [Lwt_log_js]
ign_log [Lwt_log_js]

Same as Lwt_log_js.​log but ignore the resulting thread.

ign_log_f [Lwt_log_js]

Same as Lwt_log_js.​log_f but ignore the resulting thread.

ign_notice [Lwt_log_js]
ign_notice_f [Lwt_log_js]
ign_warning [Lwt_log_js]
ign_warning_f [Lwt_log_js]
info [Lwt_log_js]
info_f [Lwt_log_js]
init_lexer [Deriving_Json_lexer]

Create a fresh lexbuf record.

initialize [JsooTop]

Initialize Js_of_ocaml toplevel.

inject [Js.​Unsafe]

Coercion to top type.

instanceof [Js]

Tests whether a Javascript object is an instance of a given class.

isNaN [Js]
iter [Js.​OPT]

Apply a function to an optional value if it is available.


J
js_expr [Js.​Unsafe]

js_expr e will parse the JavaScript expression e if e is available at compile time or will fallback to a runtime evaluation.

js_of_ocaml_version [Sys_js]

js_of_ocaml_version is the version of Js_of_ocaml.


L
loc [JsooTopError]
log [Lwt_log_js]

log ?section ?logger ~level message logs a message.

log_f [Lwt_log_js]

log_f is the same as log except that it takes a format string


M
map [Js.​OPT]

Apply a function to an optional value if it is available.

mapper [Ppx_js]
match_result [Js]

Convert a match result handle into a MatchResult object.

matched_group [Regexp]

matched_group r i is the ith group matched.

matched_string [Regexp]

matched_string r return the exact substring that matched when evaluating r.

math [Js]

The Math object

meth_call [Js.​Unsafe]

Performs a Javascript method call.

meth_callback [Js.​Unsafe]

Wrap an OCaml function so that it can be invoked from Javascript.

meth_callback_with_arguments [Js.​Unsafe]

Wrap an OCaml function so that it can be invoked from Javascript.

meth_callback_with_arity [Js.​Unsafe]
mount [Sys_js]

Register a callback to the path to dynamicly load missing files.

mount_point [Sys_js]

N
new_obj [Js.​Unsafe]

Create a Javascript object.

new_obj_arr [Js.​Unsafe]

Same Create a Javascript object.

notice [Lwt_log_js]
notice_f [Lwt_log_js]
null [Js]

The null value.

number_of_float [Js]

Conversion of OCaml floats to Javascript number objects.


O
oasis_support [Ocamlbuild_js_of_ocaml]

Map each targets given as argument to ocamlbuild and replace each element that exists in ~executables by its corresponding .js target.

obj [Js.​Unsafe]

Creates a Javascript literal object.

object_keys [Js]

Returns jsarray containing keys of the object as Object.keys does.

option [Js.​OPT]

Convert option type.


P
parseFloat [Js]
parseInt [Js]
path [Url.​Current]

The path of the current url as a list of small string.

path_of_path_string [Url]

path_of_path_string s splits s on each "/" character.

path_string [Url.​Current]

The path of the current url as one long string.

port [Url.​Current]

The port of the current url.

preprocess_phrase [JsooTopPpx]
preprocess_signature [JsooTopPpx]
preprocess_structure [JsooTopPpx]
protocol [Url.​Current]

The protocol of the current url.

pure_expr [Js.​Unsafe]

Asserts that an expression is pure, and can therefore be optimized away by the compiler if unused.

pure_js_expr [Js.​Unsafe]

pure_js_expr str behaves like pure_expr (fun () -> js_expr str).


Q
quote [Regexp]

Escapes characters with special meaning in the regexp context.


R
raise_js_error [Js]
read_bounded_int [Deriving_Json_lexer]
read_case [Deriving_Json_lexer]
read_comma [Deriving_Json_lexer]
read_comma_or_rbracket [Deriving_Json_lexer]
read_file [Sys_js]

read_file name returns the content of the file name.

read_int [Deriving_Json_lexer]
read_int32 [Deriving_Json_lexer]
read_int64 [Deriving_Json_lexer]
read_lbracket [Deriving_Json_lexer]
read_number [Deriving_Json_lexer]
read_rbracket [Deriving_Json_lexer]
read_string [Deriving_Json_lexer]
read_tag_1 [Deriving_Json_lexer]
read_tag_2 [Deriving_Json_lexer]
read_vcase [Deriving_Json_lexer]
regExp [Js]

Constructor of RegExp objects.

regExp_copy [Js]

Constructor of RegExp objects.

regExp_withFlags [Js]

Constructor of RegExp objects.

regexp [Regexp]

Simple regexp constructor.

regexp_case_fold [Regexp]

Same as regexp but matching will be performed in a case insensitive way.

regexp_string [Regexp]

regexp_string s creates a regexp matching the exact string s.

regexp_string_case_fold [Regexp]

Same as regexp_string but matching will be performed in a case insensitive way.

regexp_with_flag [Regexp]

Regexp constructor with flag that allow for case-insensitive search or multiline search (the global flag is always set).

register_predefs [Pa_deriving_Json]

register_predefs typeA typeB tells the syntax extension that typeB is an alias for typeA.

replace_first [Regexp]

replace_first r s by replaces the first match of r in s by by.

return [Js.​OPT]

Consider a value as an optional value.


S
search [Regexp]

search r s i evaluates to the index of the match and the match result or None if s (starting from i) doesn't match r.

search_forward [Regexp]

Same as search.

set [Url.​Current]

set u replaces the current Url for u.

set [Js.​Unsafe]

Set an object property.

set_channel_filler [Sys_js]

Set a callback to be called when an in_channel wants to fill its buffer.

set_channel_flusher [Sys_js]

Set a callback to be called when an out_channel flush its buffer.

set_fragment [Url.​Current]

set_fragment s replaces the current fragment by s.

sleep [Lwt_js]

sleep d is a threads which remain suspended for d seconds and then terminates.

some [Js]

Consider a value into a possibly null value.

split [Regexp]

split r s splits the string s erasing matches with r.

str_array [Js]

Convert an opaque string_array t object into an array of string.

string [Js]

Conversion of strings from OCaml to Javascript.

string_constr [Js]

The string constructor, as an object.

string_match [Regexp]

string_match r s i matches the string s starting from the ith character.

string_of_error [Js]
string_of_url [Url]

string_of_url u returns a valid string representation of u.


T
tag_error [Deriving_Json_lexer]
test [Js.​OPT]

Returns true if a value is available, false otherwise.

to_array [Js]

Conversion of arrays from Javascript to OCaml.

to_bool [Js]

Conversion of booleans from Javascript to OCaml.

to_bytestring [Js]

Conversion of strings of bytes from Javascript to OCaml.

to_float [Js]

Conversion of Javascript numbers to OCaml floats.

to_option [Js.​OPT]

Convert to option type.

to_string [Js]

Conversion of strings from Javascript to OCaml.

typeof [Js]

Returns the type of a Javascript object.


U
undefined [Js]

The undefined value

unescape [Js]

Unescape a string: 2-digit and 4-digit escape sequences are replaced by the corresponding UTF-16 code point.

unmount [Sys_js]
update_file [Sys_js]

Update a file in the Pseudo Filesystem.

url_of_string [Url]

url_of_string s parses s and builds a value of type url if s is not a valid url string, it returns None.

urldecode [Url]

urldecode s swaps percent encoding characters for their usual representation.

urlencode [Url]

urlencode ?with_plus s replace characters for their percent encoding representation.

use [JsooTop]

use fmt content Execute commands content.


V
variable [Js.​Unsafe]

Access a Javascript variable.


W
warning [Lwt_log_js]
warning_f [Lwt_log_js]
wrap_callback [Js]

Wrap an OCaml function so that it can be invoked from Javascript.

wrap_meth_callback [Js]

Wrap an OCaml function so that it can be invoked from Javascript.


Y
yield [Lwt_js]

yield () is a threads which suspends itself and then resumes as soon as possible and terminates.