I have a getter to get the value from a cookie.
Now I have 2 cookies by the name shares= and by the name obligations= .
shares=
obligations=
I want to
My one linear function to get the value cookie by its key.
cookie = key=>((new RegExp((key || '=')+'=(.*?); ','gm')).exec(document.cookie+'; ') ||['',null])[1]
Call cookie function as
cookie('some-key')