@@ -1,49 +0,0 @@
1−Elm.Main = Elm.Main || {};
2−Elm.Main.make = function (_elm) {
3− "use strict";
4− _elm.Main = _elm.Main || {};
5− if (_elm.Main.values) return _elm.Main.values;
6− var _U = Elm.Native.Utils.make(_elm);
7− var _op = {};
8− var students = Elm.Native.Port.make(_elm).outbound("students",
9− function (v) {
10− return Elm.Native.List.make(_elm).toArray(v).map(function (v) { return {name: v.name,age: v.age};});
11− },
12− _U.list([{name: "Tom",age: 42}]));
13− var time = Elm.Native.Port.make(_elm).outbound("time",function (v) { return v;},3.14);
14− var fortyTwo = Elm.Native.Port.make(_elm).outbound("fortyTwo",function (v) { return v;},42);
15− var record = Elm.Native.Port.make(_elm).inbound("record",
16− "{ x : Float, y : Float }",
17− function (v) {
18− return typeof v === "object" && "x" in v && "y" in v ? {_: {}
19− ,x: typeof v.x === "number" ? v.x : _U.badPort("a number",v.x)
20− ,y: typeof v.y === "number" ? v.y : _U.badPort("a number",
21− v.y)} : _U.badPort("an object with fields `x`, `y`",v);
22− });
23− var array = Elm.Native.Port.make(_elm).inbound("array",
24− "List Float",
25− function (v) {
26− return typeof v === "object" && v instanceof Array ? Elm.Native.List.make(_elm).fromArray(v.map(function (v) {
27− return typeof v === "number" ? v : _U.badPort("a number",v);
28− })) : _U.badPort("an array",v);
29− });
30− var tuple = Elm.Native.Port.make(_elm).inbound("tuple",
31− "( Float, Bool )",
32− function (v) {
33− return typeof v === "object" && v instanceof Array ? {ctor: "_Tuple2"
34− ,_0: typeof v[0] === "number" ? v[0] : _U.badPort("a number",v[0])
35− ,_1: typeof v[1] === "boolean" ? v[1] : _U.badPort("a boolean (true or false)",
36− v[1])} : _U.badPort("an array",v);
37− });
38− var number = Elm.Native.Port.make(_elm).inbound("number",
39− "Int",
40− function (v) {
41− return typeof v === "number" && isFinite(v) && Math.floor(v) === v ? v : _U.badPort("an integer",v);
42− });
43− var userID = Elm.Native.Port.make(_elm).inbound("userID",
44− "String",
45− function (v) {
46− return typeof v === "string" || typeof v === "object" && v instanceof String ? v : _U.badPort("a string",v);
47− });
48− return _elm.Main.values = {_op: _op};
49−};