prettier/tests_integration/path-serializer.js

10 lines
262 B
JavaScript
Raw Permalink Normal View History

2017-09-03 16:31:33 +03:00
"use strict";
module.exports = {
test: value =>
2017-09-28 12:30:51 +03:00
typeof value === "string" &&
(value.indexOf("\\") > -1 || value.indexOf(process.cwd()) > -1),
2017-09-03 16:31:33 +03:00
print: (value, serializer) =>
serializer(value.replace(process.cwd(), "<cwd>").replace(/\\/g, "/"))
2017-09-03 16:31:33 +03:00
};