Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// $ExpectError
Cookie.removeCookie()
Cookie.set('data', {
a: 1,
b: 3
}, { secure: true });
// $ExpectError
Cookie.getJson();
const data: Object = Cookie.getJSON('data');
const otherCookie = Cookie.noConflict();
otherCookie.set('name', 'OtherCookie');
const cookieWithConverter = otherCookie.withConverter((value: string, name: string): string => {
return value;
});
cookieWithConverter.defaults = {
secure: true
};
// $ExpectError
Cookie.defaults = {
secure: 1