0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Removed lodash usage from config helpers

no issue

- config helpers are required early during boot and it requiring lodash added some unnecessary require+compile time
- switched to using an inlined escapeRegExp function in place of requiring lodash
This commit is contained in:
Kevin Ansfield 2024-10-10 17:36:15 +01:00
parent 8d4d6b6516
commit 54a7f70a3c

View file

@ -1,7 +1,10 @@
const path = require('path');
const escapeRegExp = require('lodash/escapeRegExp');
const {URL} = require('url');
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
const DEFAULT_HOST_ARG = /.*/;
const getHostInfo = (config) => {