To set session scoped cookies, one must set the expires parameter to 0. Using hasOwnProperty method allows to overcome the limit of the if statement. Moreover, the current implementation seems to have a tipo, as the check is performed on "expire" and the value is taken from "expires" and the jsdoc advocates "expires".
To set session scoped cookies, one must set the expires parameter to 0. Using hasOwnProperty method allows to overcome the limit of the if statement. Moreover, the current implementation seems to have a tipo, as the check is performed on "expire" and the value is taken from "expires" and the jsdoc advocates "expires".