From 37d7cb8565ec3edba6de464a42e7b163a4e30a58 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 04b20708..defd0215 100644 --- a/lib/output.js +++ b/lib/output.js @@ -1033,7 +1033,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) -- 2.34.1