Simple JS function which accepts user object and returns "NAME".
JS file generated using,
elm-make Main.elm --output app.js
Can be minified using Google Closure compiler,
java -jar compiler.jar -O ADVANCED --language_in ECMASCRIPT5 \
--jscomp_off globalThis --js app.js --js_output_file app.min.js
Issue: Google Closure compiler renames user object while sending it to JS. This example will not work with app.min.js
. Console.log when app.min.js
is used.
Object { name: "Aravinda", aa: "[email protected]", Y: "" }