site/node_modules/pretty-format/printString.js

8 lines
155 B
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
'use strict';
const ESCAPED_CHARACTERS = /(\\|\"|\')/g;
module.exports = function printString(val) {
return val.replace(ESCAPED_CHARACTERS, '\\$1');
}