Add web-oriented JavaScript edit distance

old work, to be committed