Converted to a JavaScript library.