No jQuery dependency, more standalone. Doesn't do utf8 encoding/decoding yet, but structurally a little nicer for anyone who wants to use it in a random environment. Since it's cross domain it only works with GET, so... conceivably a browser could hit a limit in the query string.
If you support CORS headers on the Sinatra side, a POST XMLHttpRequest would be feasible here. Feel free to merge if you like.
new Ve('ja').words('ありがとう', function(words) {
// do stuffs
});
No jQuery dependency, more standalone. Doesn't do utf8 encoding/decoding yet, but structurally a little nicer for anyone who wants to use it in a random environment. Since it's cross domain it only works with GET, so... conceivably a browser could hit a limit in the query string.
If you support CORS headers on the Sinatra side, a POST XMLHttpRequest would be feasible here. Feel free to merge if you like.