jmd-scripts
Version:
CLI for common scripts for my projects
23 lines (18 loc) • 715 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.winPathSerializer = exports.unquoteSerializer = void 0;
var _slash = _interopRequireDefault(require("slash"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// this removes the quotes around strings...
const unquoteSerializer = {
print: val => val,
test: val => typeof val === 'string' // this converts windows style file paths to unix...
};
exports.unquoteSerializer = unquoteSerializer;
const winPathSerializer = {
print: val => (0, _slash.default)(val),
test: val => typeof val === 'string' && val.includes('\\')
};
exports.winPathSerializer = winPathSerializer;