UNPKG

324 BJavaScriptView Raw
1const httpVerbs = [
2 'GET',
3 'HEAD',
4 'POST',
5 'PUT',
6 'DELETE',
7 'CONNECT',
8 'OPTIONS',
9 'TRACE',
10 'PATCH'
11];
12
13const requestRegex = new RegExp(`(${httpVerbs.join('|')})\\s(.*)`, 'i');
14const replacementRegex = /\$([a-zA-Z\.\d\-\_]*)/g;
15
16module.exports = {
17 httpVerbs,
18 requestRegex,
19 replacementRegex
20};