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.
master
Christopher Chedeau 2017-01-20 14:55:41 -08:00 committed by GitHub
parent 080b7f8ec4
commit 21729d8207
2 changed files with 1 additions and 3 deletions

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"
},

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") {