Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to undefined values #25

Open
arshadkazmi42 opened this issue Oct 1, 2021 · 0 comments
Open

Support to undefined values #25

arshadkazmi42 opened this issue Oct 1, 2021 · 0 comments

Comments

@arshadkazmi42
Copy link
Owner

if a key is missing from the request data, add handler to support that or give proper messaging.
Example:

const ChromeCookie = require('chrome-cookie');
const CCookie = new ChromeCookie();



const DATA = [
      {
        'creation_utc': 'now',
        'encrypted_value': 'enc2',
        'expires_utc': 'never',
        'has_expires': 'yes',
        'host_key': 'youtube.com',
        'is_httponly': 'yes',
        'is_persistent': 'no',
        'is_secure': 'yes',
        'last_access_utc': 'now',
        'name': 'youtube',
        'path': '/root',
        'priority': 'no',
        'value': 'kazmi',
        'samesite': -1,
        'encrypted_value': {}
      }
    ];

CCookie.setCookie(DATA);

above code breaks if we remove encrypted_value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant