JS→Fay function serialization