Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-cookies/cookies

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-cookies/cookies

Cookie Manager for React Native

  • 6.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
120K
decreased by-2.87%
Maintainers
1
Weekly downloads
 
Created

What is @react-native-cookies/cookies?

@react-native-cookies/cookies is a React Native library that provides a simple API for managing cookies in your React Native applications. It allows you to set, get, and clear cookies, making it easier to handle authentication and session management in your mobile apps.

What are @react-native-cookies/cookies's main functionalities?

Set a Cookie

This feature allows you to set a cookie for a specific domain. The code sample demonstrates how to set a cookie with various attributes such as name, value, domain, path, version, and expiration date.

import { Cookies } from '@react-native-cookies/cookies';

Cookies.set('https://example.com', {
  name: 'myCookie',
  value: 'cookieValue',
  domain: 'example.com',
  path: '/',
  version: '1',
  expires: '2023-12-31T23:59:59.000Z'
});

Get Cookies

This feature allows you to retrieve all cookies for a specific domain. The code sample demonstrates how to get cookies and log them to the console.

import { Cookies } from '@react-native-cookies/cookies';

Cookies.get('https://example.com').then(cookies => {
  console.log(cookies);
});

Clear Cookies

This feature allows you to clear all cookies. The code sample demonstrates how to clear all cookies and log a confirmation message to the console.

import { Cookies } from '@react-native-cookies/cookies';

Cookies.clearAll().then(() => {
  console.log('All cookies cleared');
});

Other packages similar to @react-native-cookies/cookies

Keywords

FAQs

Package last updated on 11 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc