From fe885cd4b6b596f8bd0a1c06dbc5229e2e8c3908 Mon Sep 17 00:00:00 2001 From: Vladimir Zhuravlev Date: Sun, 31 Mar 2013 20:55:11 +0700 Subject: [PATCH] Quote objects with numeric keys --- lib/output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/output.js b/lib/output.js index 42b3aad9..08b49d64 100644 --- a/lib/output.js +++ b/lib/output.js @@ -1028,7 +1028,7 @@ function OutputStream(options) { DEFPRINT(AST_ObjectKeyVal, function(self, output){ var key = self.key; if (output.option("quote_keys")) { - output.print_string(key); + output.print_string(key + ""); } else if ((typeof key == "number" || !output.option("beautify") && +key + "" == key)