source: node_modules/ramda/src/internal/_quote.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 352 bytes
Line 
1function _quote(s) {
2 var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace
3 .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0');
4 return '"' + escaped.replace(/"/g, '\\"') + '"';
5}
6
7module.exports = _quote;
Note: See TracBrowser for help on using the repository browser.