runlet 0.1.0

A semantic executable model for the Runlet orchestration language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! writes: 3
#! expect: [false, true, true]
# `key: value if cond` omits the key when the condition fails; the write
# schema's optional properties accept the omission.
contacts = data.contacts()
flags = for c in contacts limit 4 {
    needs_fix = not regex.test(c.phone, "^\\+1[0-9]{10}$")
    r = write.update({
        id: c.id,
        phone: ("+" + regex.replace(c.phone, "[^0-9]", "")) if needs_fix,
        company: c.company if c.company != ""
    })
    return needs_fix
}
return flags