elixir_script v0.30.0 ElixirScript.JS View Source

This module defines macros and functions which implement JavaScript functionality that may not translate easily to Elixir. For instance, creating a new object

Link to this section Summary

Functions

Creates a breakpoint for JavaScript debuggers to stop at

Determines if value is an instance of type

Takes the given map and returns an object Throws an error if any key is not a number, binary, or atom

Mutates an existing JavaScript object

Creates new JavaScript objects

The current JavaScript context

Throws the term given

Returns the type of the given value

Link to this section Functions

Creates a breakpoint for JavaScript debuggers to stop at

Determines if value is an instance of type.

Takes the given map and returns an object Throws an error if any key is not a number, binary, or atom

ElixirScript.JS.map_to_object(%{my: "map"})
Link to this function mutate(object, key, value) View Source

Mutates an existing JavaScript object.

ElixirScript.JS.mutate elem, "width", 100

Creates new JavaScript objects.

ElixirScript.JS.new User, ["first_name", "last_name"]

The current JavaScript context

Throws the term given

Returns the type of the given value