Provide the Context to pure-JS functions

+ adjust the whitespace pattern