Drop jsesc (#357)

Even though JSON.stringify is not 100% correct, this is only used for debugging and doesn't warrant adding a dependency for it.
This commit is contained in:
Christopher Chedeau authored and GitHub committed 2017-01-20 14:55:41 -08:00
1 parent 080b7f8ec4
commit 21729d8207
2 files changed
+1 -3

No files matched your search

-1
View File
@@ -21,7 +21,6 @@
"esutils": "2.0.2",
"flow-parser": "0.38.0",
"get-stdin": "5.0.1",
"jsesc": "2.4.0",
"minimist": "1.2.0",
"private": "0.1.6"
},
+1 -2
View File
@@ -1,5 +1,4 @@
"use strict";
var jsesc = require("jsesc");
function flattenDoc(doc) {
if (!doc || typeof doc === "string" || doc.type === "line") {
@@ -47,7 +46,7 @@ function flattenDoc(doc) {
function printDoc(doc) {
if (typeof doc === "string") {
return jsesc(doc, { wrap: true });
return JSON.stringify(doc);
}
if (doc.type === "line") {