A sample implementation of the Asteroid API in javascript