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:
parent
8d4d6b6516
commit
54a7f70a3c
1 changed files with 4 additions and 1 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue