Client side JavaScript library for JSTP