summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/exec/escapeshellarg.js.map
blob: e3259705645e6c8c47ddd10606fe9b2c3c1d8cd3 (plain) (blame)
1
{"version":3,"sources":["../../../src/php/exec/escapeshellarg.js"],"names":["module","exports","escapeshellarg","arg","ret","replace","m","i","s","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,cAAT,CAAyBC,GAAzB,EAA8B;AAC7C;AACA;AACA;AACA;AACA;;AAEA,MAAIC,MAAM,EAAV;;AAEAA,QAAMD,IAAIE,OAAJ,CAAY,SAAZ,EAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmB;AAC9C,WAAOF,EAAEG,KAAF,CAAQ,CAAR,EAAW,CAAX,IAAgB,MAAvB;AACD,GAFK,CAAN;;AAIA,SAAO,MAAML,GAAN,GAAY,GAAnB;AACD,CAdD","file":"escapeshellarg.js","sourcesContent":["module.exports = function escapeshellarg (arg) {\n  //  discuss at: http://locutus.io/php/escapeshellarg/\n  // original by: Felix Geisendoerfer (http://www.debuggable.com/felix)\n  // improved by: Brett Zamir (http://brett-zamir.me)\n  //   example 1: escapeshellarg(\"kevin's birthday\")\n  //   returns 1: \"'kevin\\\\'s birthday'\"\n\n  var ret = ''\n\n  ret = arg.replace(/[^\\\\]'/g, function (m, i, s) {\n    return m.slice(0, 1) + '\\\\\\''\n  })\n\n  return \"'\" + ret + \"'\"\n}\n"]}