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

biskviit

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

biskviit - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

package.json
{
"name": "biskviit",
"version": "1.0.0",
"version": "1.0.1",
"description": "Yet another module for http cookie handling",

@@ -33,3 +33,6 @@ "main": "lib/biskviit.js",

"psl": "^1.1.7"
},
"engines": {
"node": ">=1.0.0"
}
}
}
# biskviit
Yet another node module for handling http cookies. This module parses `Set-Cookie` header, stores the data to memory and returns valid value for `Cookie` header once needed based on the stored cookie data.
> **NB** Requires iojs or Node v4+ to support some ES6 features used by this module. Might work with older Node versions as well but not tested
## Usage

@@ -5,0 +7,0 @@

@@ -186,2 +186,16 @@ 'use strict';

it('should check if a cookie matches particular domain and path', function() {
var cookie = {
name: 'zzz',
value: 'abc',
path: '/def',
expires: new Date(Date.now() + 10000),
domain: 'example.com',
secure: false,
httponly: false
};
expect(biskviit.match(cookie, 'http://example.com/def/')).to.be.true;
expect(biskviit.match(cookie, 'http://example.com/bef/')).to.be.false;
});
it('should check if a cookie is secure', function() {

@@ -316,3 +330,3 @@ var cookie = {

// long
biskviit.set('SSID=Ap4P….GTEq; Domain=foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly', 'https://foo.com/');
biskviit.set('SSID=Ap4P….GTEq; Domain=foo.com; Path=/test; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly', 'https://foo.com/');
// subdomains

@@ -341,3 +355,3 @@ biskviit.set('SSID=Ap4P….GTEq; Domain=.foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly', 'https://www.foo.com/');

domain: 'foo.com',
path: '/',
path: '/test',
secure: true,

@@ -344,0 +358,0 @@ httponly: true

Sorry, the diff of this file is not supported yet

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