elixir_script v0.16.0 Release Notes

Release Date: 2016-02-27 // about 7 years ago
  • โž• Added

    • Bitstring pattern matching
    • Bitstrings in for comprehensions
    • Functions with catch, after, else clauses
    • with special form
    • ๐Ÿ“Œ Pin operator in map keys and function clauses
    • โž• Added Kernel.object/1 function to make it more natural to create a JavaScript object with string keys. Elixirscript, by default turns the following, %{a:"b"} into {[Symbol.for("a")]: "b"} in JavaScript. In order to get string keys, one would have to do %{"a" => "b"} which turns into {a: "b"} in JavaScript. With Kernel.object, you can create string keyed maps conveniently, object(a: "b") which turns into {a: "b"}.

    NOTE: when updating the created by, you still have to use the string form %{ my_map | "a" => "c" }

    โœ‚ Removed

    • โšก๏ธ JS.update(object, property, value) has been removed and replaced with JS.update(object, map). This allows you to update multiple values on a javascript object at once.

    ๐Ÿ›  Fixed

    • Optional parameters should now work as expected