Skip to content

cookieHandler read

Mike Byrne edited this page Jan 25, 2022 · 2 revisions

description

Returns the value of a named cookie

requires

  • nothing

parameters

  • name - required - name of cookie

returns

  • string of cookie value or null if cookie doesn't exist

example usage:

import { cookieHandler } from '@area17/a17-helpers';

cookieHandler.read("splash"); // value or null if cookie doesn't exist

thanks to

http://www.quirksmode.org/js/cookies.html