From c1ae2dae875b507ef585dfdfe78aa0cf91dcb2cc Mon Sep 17 00:00:00 2001 From: Ates Goral Date: Sun, 12 Oct 2014 01:02:29 -0400 Subject: [PATCH] space_function option to always include a space after function keyword --- lib/output.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/output.js b/lib/output.js index 7fe61af3..360b7aa3 100644 --- a/lib/output.js +++ b/lib/output.js @@ -50,6 +50,7 @@ function OutputStream(options) { indent_level : 4, quote_keys : false, space_colon : true, + space_function : false, ascii_only : false, unescape_regexps : false, inline_script : false, @@ -713,8 +714,10 @@ function OutputStream(options) { if (!nokeyword) { output.print("function"); } - if (self.name) { + if (options.space_function || self.name) { output.space(); + } + if (self.name) { self.name.print(output); } output.with_parens(function(){