Closed MeRahulAhire closed 3 years ago
No, there's no built-in support for ms. https://github.com/voltace/browser-cookies/blob/f7de017e295b89241e14d047c2f98f2b69a510c7/src/browser-cookies.js#L18-L23
You can pass a number in days, or any other arguments that new Date()
can read. For example:
cookies.set('count', 42, {expires: (new Date().getTime() + ms('1d')) / 864e5});
I want to use this library in project but had an doubt regarding setting expiry for the token. Does this library support the ms library format as below?
or do I need to use it additionally?