1var jsHelper = function () { 2 3 var isAString = function (arg) { 4 return (typeof arg === 'string' || arg instanceof String); 5 } 6 7 8 var cookies = function () { 9 var get = function (cookieName) { 10 return Cookies.get(cookieName); 11 }; 12 var remove = function (cookieName, options) { 13 Cookies.remove(cookieName, options); 14 }; 15 var setSession = function (cookieName, value, options) { 16 if (!options) options = {}; 17 // forcar expires=null para cookie de sessão 18 options.expires = null; 19 set(cookieName, value, options); 20 }; 21 var set = function (cookieName, value, options) { 22 // expires =null implica cookie de sessão 23 if (!options) options = {}; 24 if (!options.secure && options.secure !== null) options.secure = true; // default to true (a não ser que receba de fora null=omitir) 25 if (!options.httpOnly && options.httpOnly !== null) options.httpOnly = false; // default to false (a não ser que receba de fora null=omitir) 26 if (!options.sameSite && options.sameSite !== null) options.sameSite = 'Strict'; // default to Strict (a não ser que receba de fora null=omitir) 27 if (!options.expires && options.expires !== null) options.expires = 7; // default to 7 days (a não ser que receba de fora null=omitir) 28 Cookies.set(cookieName, value, options); 29 }; 30 return { get, set, setSession, remove }; 31 }(); 32 33 34 return { 35 isAString, 36 cookies 37 }; 38}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.