configurable template/wrapper for generating JavaScript