Use sprintf-js with named arguments to generate JS.