generated from erangel1/generic-template
initial commit. phase 1 complete
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
const REGEXP = /(\w+)=("[^"]*")/g;
|
||||
|
||||
module.exports = (wwwAuthenticate) => {
|
||||
const params = {};
|
||||
try {
|
||||
while (REGEXP.exec(wwwAuthenticate) !== null) {
|
||||
if (RegExp.$1 && RegExp.$2) {
|
||||
params[RegExp.$1] = RegExp.$2.slice(1, -1);
|
||||
}
|
||||
}
|
||||
} catch (err) {}
|
||||
|
||||
return params;
|
||||
};
|
||||
Reference in New Issue
Block a user