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

browser-cookie

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-cookie - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

5

package.json
{
"name": "browser-cookie",
"version": "1.0.4",
"version": "1.0.5",
"description": "Standalone cookie class for the browser.",

@@ -10,3 +10,3 @@ "author": "muji <noop@xpm.io>",

},
"dependencies": {},
"main": "lib/cookie.js",
"devDependencies": {

@@ -65,2 +65,3 @@ "brfs": "~1.4.0",

"install.md",
"api.md",
"developer.md",

@@ -67,0 +68,0 @@ "license.md"

@@ -6,2 +6,9 @@ Table of Contents

* [Install](#install)
* [Cookie](#cookie-1)
* [Options](#options)
* [Methods](#methods)
* [cookie.set(key, value, [options])](#cookiesetkey-value-options)
* [cookie.get(key, [value])](#cookiegetkey-value)
* [cookie.del(key)](#cookiedelkey)
* [cookie.clear(except, [options])](#cookieclearexcept-options)
* [Developer](#developer)

@@ -31,2 +38,33 @@ * [Test](#test)

## Cookie
The `Cookie` class exposes the ability to get, set and delete cookie values.
### Options
* `raw` - Do not URI encode the cookie value.
* `json` - Store the cookie value as JSON.
* `expires` - Define lifetime of the cookie in days, default is 30.
* `path` - Define the path where the cookie is valid, default is /.
* `domain` - Define the domain whether the cookie is valid.
* `secure` - If true, the cookie transmission requires a secure protocol (https).
### Methods
#### cookie.set(key, value, [options])
Sets a cookie value.
#### cookie.get(key, [value])
Gets a cookie value. If the `value` parameter is specified it should be a conversion function, if no key is specified an object containing all key value pairs is returned.
#### cookie.del(key)
Deletes a cookie value.
#### cookie.clear(except, [options])
Clear all cookies except the keys listed in the `except` array.
## Developer

@@ -33,0 +71,0 @@

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