From 824a2d9f587ca017fc71b84d835e72f54f9c87c4 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 7 Nov 2018 18:02:36 +0100 Subject: Began rewrite --- node_modules/locutus/php/network/setcookie.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 node_modules/locutus/php/network/setcookie.js (limited to 'node_modules/locutus/php/network/setcookie.js') diff --git a/node_modules/locutus/php/network/setcookie.js b/node_modules/locutus/php/network/setcookie.js new file mode 100644 index 0000000..912f2fe --- /dev/null +++ b/node_modules/locutus/php/network/setcookie.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function setcookie(name, value, expires, path, domain, secure) { + // discuss at: http://locutus.io/php/setcookie/ + // original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) + // bugfixed by: Andreas + // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman) + // improved by: Kevin van Zonneveld (http://kvz.io) + // example 1: setcookie('author_name', 'Kevin van Zonneveld') + // returns 1: true + + var setrawcookie = require('../network/setrawcookie'); + return setrawcookie(name, encodeURIComponent(value), expires, path, domain, secure); +}; +//# sourceMappingURL=setcookie.js.map \ No newline at end of file -- cgit v1.2.3