react-cookie
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8357
85