test-action-debian-package/node_modules/ramda/es/internal/_quote.js
Dawid Dziurla 9308795b8b
update
2020-03-26 15:37:35 +01:00

5 lines
341 B
JavaScript

export default function _quote(s) {
var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace
.replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0');
return '"' + escaped.replace(/"/g, '\\"') + '"';
}