summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/network/setrawcookie.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/locutus/php/network/setrawcookie.js.map')
-rw-r--r--node_modules/locutus/php/network/setrawcookie.js.map1
1 files changed, 0 insertions, 1 deletions
diff --git a/node_modules/locutus/php/network/setrawcookie.js.map b/node_modules/locutus/php/network/setrawcookie.js.map
deleted file mode 100644
index cec1cce..0000000
--- a/node_modules/locutus/php/network/setrawcookie.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["../../../src/php/network/setrawcookie.js"],"names":["module","exports","setrawcookie","name","value","expires","path","domain","secure","window","test","parseInt","Date","toUTCString","r","i","s","hasOwnProperty","push","document","cookie","join"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,IAAvB,EAA6BC,KAA7B,EAAoCC,OAApC,EAA6CC,IAA7C,EAAmDC,MAAnD,EAA2DC,MAA3D,EAAmE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjC,WAAO,IAAP;AACD;;AAED,MAAI,OAAOJ,OAAP,KAAmB,QAAnB,IAAgC,OAAD,CAAUK,IAAV,CAAeL,OAAf,CAAnC,EAA4D;AAC1DA,cAAUM,SAASN,OAAT,EAAkB,EAAlB,CAAV;AACD;;AAED,MAAIA,mBAAmBO,IAAvB,EAA6B;AAC3BP,cAAUA,QAAQQ,WAAR,EAAV;AACD,GAFD,MAEO,IAAI,OAAOR,OAAP,KAAmB,QAAvB,EAAiC;AACtCA,cAAW,IAAIO,IAAJ,CAASP,UAAU,GAAnB,CAAD,CAA0BQ,WAA1B,EAAV;AACD;;AAED,MAAIC,IAAI,CAACX,OAAO,GAAP,GAAaC,KAAd,CAAR;AACA,MAAIW,IAAI,EAAR;AACA,MAAIC,IAAI;AACNX,aAASA,OADH;AAENC,UAAMA,IAFA;AAGNC,YAAQA;AAHF,GAAR;AAKA,OAAKQ,CAAL,IAAUC,CAAV,EAAa;AACX,QAAIA,EAAEC,cAAF,CAAiBF,CAAjB,CAAJ,EAAyB;AACvB;AACAC,QAAED,CAAF,KAAQD,EAAEI,IAAF,CAAOH,IAAI,GAAJ,GAAUC,EAAED,CAAF,CAAjB,CAAR;AACD;AACF;;AAED,MAAIP,MAAJ,EAAY;AACVM,MAAEI,IAAF,CAAO,QAAP;AACD;;AAEDT,SAAOU,QAAP,CAAgBC,MAAhB,GAAyBN,EAAEO,IAAF,CAAO,GAAP,CAAzB;;AAEA,SAAO,IAAP;AACD,CA9CD","file":"setrawcookie.js","sourcesContent":["module.exports = function setrawcookie (name, value, expires, path, domain, secure) {\n // discuss at: http://locutus.io/php/setrawcookie/\n // original by: Brett Zamir (http://brett-zamir.me)\n // original by: setcookie\n // improved by: Kevin van Zonneveld (http://kvz.io)\n // input by: Michael\n // note 1: This function requires access to the `window` global and is Browser-only\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // example 1: setrawcookie('author_name', 'Kevin van Zonneveld')\n // returns 1: true\n\n if (typeof window === 'undefined') {\n return true\n }\n\n if (typeof expires === 'string' && (/^\\d+$/).test(expires)) {\n expires = parseInt(expires, 10)\n }\n\n if (expires instanceof Date) {\n expires = expires.toUTCString()\n } else if (typeof expires === 'number') {\n expires = (new Date(expires * 1e3)).toUTCString()\n }\n\n var r = [name + '=' + value]\n var i = ''\n var s = {\n expires: expires,\n path: path,\n domain: domain\n }\n for (i in s) {\n if (s.hasOwnProperty(i)) {\n // Exclude items on Object.prototype\n s[i] && r.push(i + '=' + s[i])\n }\n }\n\n if (secure) {\n r.push('secure')\n }\n\n window.document.cookie = r.join(';')\n\n return true\n}\n"]} \ No newline at end of file