
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@bitscheme/react-native-cookie
Advanced tools
A cookie manager module for react-native(Supports for both iOS and Android).
# install library from npm
npm install react-native-cookie --save
# link native code
react-native link react-native-cookie
import Cookie from 'react-native-cookie';
Cookie.get(url:String, name?: String): Promise<Object|String>
// get all cookies which are belonged to 'http://bing.com/'
Cookie.get('http://bing.com/').then((cookie) => console.log(cookie));
// get cookie named 'foo' from 'http://bing.com/'
Cookie.get('http://bing.com/', 'foo').then((cookie) => console.log(cookie));
Cookie.set(url:String, name: String, value: any, options?: Object): Promise
The following options are available for now
domain Specifies the value for the Domain Set-Cookie attribute. By default, no domain is set, and most clients will consider the cookie to apply to only the current domain.
expires Specifies the Date object to be the value for the Expires Set-Cookie attribute. By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting a web browser application.
path Specifies the value for the Path Set-Cookie attribute. By default, the path is considered the "default path". By default, no maximum age is set, and most clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting a web browser application
// set cookie 'foo=bar' for 'http://bing.com/'
Cookie.set('http://bing.com/', 'foo', 'bar').then(() => console.log('success'));
// set cookie 'foo=bar' for 'http://bing.com/' with options:
Cookie.set('http://bing.com/', 'foo', 'bar', {
path: 'ditu',
domain: 'cn.bing.com'
}).then(() => console.log('success'));
Cookie.clear(url?: String): Promise
// clear all cookies for all domains
Cookie.clear();
// clear all cookies for 'http://bing.com'
Cookie.clear('http://bing.com');
FAQs
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.