Javscript implementation of knodules