forked from DebaucheryLibrarian/traxxx
Fixed countries seed file. Updated MOFOS scraper. Improved Reality Kings scraper. Limiting photos for XEmpire scraper.
This commit is contained in:
16
src/utils/cookies.js
Normal file
16
src/utils/cookies.js
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
function cookieToData(cookieString) {
|
||||
return cookieString.split('; ').reduce((acc, cookie) => {
|
||||
const [key, value] = cookie.split('=');
|
||||
|
||||
return {
|
||||
...acc,
|
||||
[key]: value,
|
||||
};
|
||||
}, {});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
cookieToData,
|
||||
};
|
||||
Reference in New Issue
Block a user