-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest.js
49 lines (47 loc) · 1.05 KB
/
test.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
const map = yaml`
map:
Block style: !!map
Clark : Evans
Ingy : döt Net
Oren : Ben-Kiki
Flow style: !!map { Clark: Evans, Ingy: döt Net, Oren: Ben-Kiki }
`
const omap = /* yaml */`
omap:
Bestiary: !!omap
- aardvark: African pig-like ant eater. Ugly.
- anteater: South-American ant eater. Two species.
- anaconda: South-American constrictor snake. Scaly.
Numbers: !!omap [ one: 1, two: 2, three : 3 ]
`
const pairs = YAML`
pairs:
Block tasks: !!pairs
- meeting: with team.
- meeting: with boss.
- break: lunch.
- meeting: with client.
Flow tasks: !!pairs [ meeting: with team, meeting: with boss ]
`
const set = /* YAML */`
set:
baseball players: !!set
? Mark McGwire
? Sammy Sosa
? Ken Griffey
baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees }
`
const seq = yaml`
seq:
Block style: !!seq
- Mercury
- Venus
- Earth
- Mars
- Jupiter
- Saturn
- Uranus
- Neptune
- Pluto
Flow style: !!seq [ Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto ]
`