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

react-cookie

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cookie - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

build/cookie.js

@@ -26,3 +26,3 @@ 'use strict';

var IS_NODE = typeof document !== 'undefined' || typeof module !== 'undefined' && module.exports;
var IS_NODE = typeof document === 'undefined' || typeof module !== 'undefined' && module.exports;
var _rawCookie = {};

@@ -29,0 +29,0 @@ var _res = undefined;

{
"name": "react-cookie",
"version": "1.0.1",
"version": "1.0.2",
"description": "Load and save cookies within your React application",

@@ -5,0 +5,0 @@ "main": "build/cookie.js",

@@ -8,3 +8,3 @@ # react-cookie

## Isomorphic cookies!
You can also plug it directly with a Node.js request by adding just before the renderToString: `var unplug = reactCookie.plugToRequest(req, res);`<br />
You can also plug it directly with a Node.js request by adding just before the renderToString: `var unplug = cookie.plugToRequest(req, res);`<br />
*(require the cookieParser middleware)*

@@ -14,3 +14,3 @@

If you are within a non-browser or Node.js environment, you can use `reactCookie.setRawCookie(req.headers.cookie)`
If you are within a non-browser or Node.js environment, you can use `cookie.setRawCookie(req.headers.cookie)`

@@ -55,15 +55,10 @@

## Without CommonJS
You can use react-cookie with anything by using the global variable `reactCookie`.
*Note that `window` need to exists to use `reactCookie`.*
## Usage
### `reactCookie.load(name, [doNotParse])`
### `reactCookie.select([regex])`
### `reactCookie.save(name, val, [opt])`
### `reactCookie.remove(name, [opt])`
### `reactCookie.plugToRequest(req, res): unplug()`
### `reactCookie.setRawCookie(cookies)`
### `cookie.load(name, [doNotParse])`
### `cookie.select([regex])`
### `cookie.save(name, val, [opt])`
### `cookie.remove(name, [opt])`
### `cookie.plugToRequest(req, res): unplug()`
### `cookie.setRawCookie(cookies)`

@@ -70,0 +65,0 @@ ## opt

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