socket-actions
Version:
Websocket implementation to simplify communication and queueing of user actions.
17 lines (13 loc) • 600 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
const parseCookies = (cookieString) => {
const cookieArray = cookieString.split(";").map((item) => item.split("="));
const parsedCookies = {};
for (const [key, value] of cookieArray) {
const parsedKey = decodeURIComponent(key === null || key === void 0 ? void 0 : key.trim());
const parsedValue = decodeURIComponent(value === null || value === void 0 ? void 0 : value.trim());
parsedCookies[parsedKey] = parsedValue;
}
return parsedCookies;
};
exports.default = parseCookies;