Skip to content

Commit

Permalink
drops escapeRegExp dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
bezoerb committed Sep 16, 2022
1 parent b00e0ea commit e939684
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const loop = (cb) => {
};
};

const escapeRegExp = string => string.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');

module.exports = (options_ = {}) => {
const options = {...DEFAULTS, ...options_};

Expand All @@ -49,7 +51,6 @@ module.exports = (options_ = {}) => {
);

const mapping = await getDataUriMapping([...urls], options);
const {default: escapeRegExp} = await import('escape-string-regexp');

root.walkDecls(
filter,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"dependencies": {
"asset-resolver": "^3.0.5",
"debug": "^4.3.4",
"escape-string-regexp": "^5.0.0",
"filesize": "^9.0.11",
"svgo": "^2.8.0"
},
Expand Down

0 comments on commit e939684

Please sign in to comment.