diff --git a/index.js b/index.js index efcd9ca..3ba14ca 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ module.exports.parse = parse * @private */ -var basename = require('path').basename +var basename = path => (path ?? '').replace(/[\\/]+$/, '').split(/[\\/]/).pop(); /** * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")