JavaScript library to abstract the post message api and create a message queue/bus