Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-04-01 01:14:39 +03:00
parent 70b9976536
commit 8517ed1d0f

View File

@ -10,9 +10,10 @@
// //
var quoteRegExp = var quoteRegExp =
RegExp.quoteRegExp = RegExp.quoteRegExp =
function(str){ RegExp.quoteRegExp
return str || function(str){
.replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') } return str
.replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') }
var path2lst = function(path){ var path2lst = function(path){
return (path instanceof Array ? path : path.split(/[\\\/]+/g)) return (path instanceof Array ? path : path.split(/[\\\/]+/g))