IMO this should be a different method then `dust.escapeJs`. This method is used by the compiler to put template data and stuff into a double quoted javascript string. whereas the general `dust.escapeJS` is being used by the templates to do `|j` which can have any odd context. I would perfer to leave this.

Alternatively, I can move this and isArray into a utility file and have both reference that. it'll scale better but I'm struggling to a clean way for dust/compiler/parser to share functions without a)dumping everything in the global dust object or b) creating global variable or c) wrapping everything in yet another closure.

we are currently doing a).