daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function parse(cookie) {
  2.     let result = {};
  3.     let values = cookie.split(";");
  4.     for( value of values ) {
  5.         value = value.trim().split('=');
  6.         if(value.length == 2) result[value[0]] = value[1];
  7.     }
  8.     return result;
  9. }
  10.  
  11. module.exports = parse;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top