Socket
Socket
Sign inDemoInstall

egg-cookies

Package Overview
Dependencies
Maintainers
5
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-cookies - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

LICENSE.txt

5

History.md
2.2.1 / 2017-02-22
==================
* fix: emit on ctx.app (#5)
2.2.0 / 2017-02-21

@@ -3,0 +8,0 @@ ==================

7

lib/cookies.js

@@ -7,3 +7,2 @@ 'use strict';

const Cookie = require('./cookie');
const EventEmitter = require('events');

@@ -19,5 +18,4 @@ const KEYS_ARRAY = Symbol('eggCookies:keysArray');

class Cookies extends EventEmitter {
class Cookies {
constructor(ctx, keys) {
super();
this[KEYS_ARRAY] = keys;

@@ -27,2 +25,3 @@ this._keys = keys;

this.secure = this.ctx.secure;
this.app = ctx.app;
}

@@ -110,3 +109,3 @@

if (value.length > 4093) {
this.emit('cookieLimitExceed', { name, value });
this.app.emit('cookieLimitExceed', { name, value, ctx: this.ctx });
}

@@ -113,0 +112,0 @@

{
"name": "egg-cookies",
"version": "2.2.0",
"version": "2.2.1",
"description": "cookies module for egg",

@@ -23,3 +23,2 @@ "files": [

"eslint-config-egg": "^3.2.0",
"intelli-espower-loader": "^1.0.1",
"keygrip": "^1.0.1",

@@ -35,4 +34,4 @@ "power-assert": "^1.4.2"

"scripts": {
"test": "egg-bin test --require intelli-espower-loader",
"cov": "egg-bin cov --require intelli-espower-loader",
"test": "egg-bin test",
"cov": "egg-bin cov",
"lint": "eslint index.js test",

@@ -39,0 +38,0 @@ "ci": "npm run lint && npm run cov",

@@ -53,1 +53,5 @@ # egg-cookies

```
## License
[MIT](LICENSE.txt)
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