-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.js
68 lines (64 loc) · 1.12 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
var jsonDefault = JSON.stringify({
"WhatsUp": "E",
"Survived": 100000000,
"History": [
"Giant Lizards",
"Meteor",
"Lizards Dead",
"Katydids Alive"
],
"FeatureRequests": [
{
"Name": "Dart",
"Properties": ["Poison", "Projectile"],
"Anatomy": "Abdomen"
},
{
"Name": "Fire Breath",
"Properties": ["Fire", "Vapor"],
"Anatomy": "Mouth"
}
],
"DragonsExist": false,
"MonkeysSmart": true,
"Family": {
"Class": "Insecta",
"Order": {
"Superorder": {
"Subclass": "Pterygota",
"Infraclass": "Polyneoptera"
},
"Order": "Orthoptera"
},
"Suborder": "Ensifera",
"Family": "Tettigoniidae"
}
}, "", 4);
var defaultKatydid = `(
.WhatsUp == "E" &
.Survived >= 1000000 /*years*/ &
.DragonsExist != true &
.MonkeysSmart :: $bool &
.History [
*,
_ == "Katydids Alive"
] &
.FeatureRequests._ {
Name *= "art";
*;
Anatomy $= "omen";
}
)
`;
var defaultKatydidXML = 'WhatsUp == "E"';
var xmlDefault = "<WhatsUp>E</WhatsUp>";
var defaults = {
"json": {
"katydid": defaultKatydid,
"input": jsonDefault
},
"xml": {
"katydid": defaultKatydidXML,
"input": xmlDefault
}
}