New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

electrode-cookies

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrode-cookies - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

42

hapi-plugin.js
"use strict";
var each = require("lodash/each");
const each = require("lodash/each");
const { universalHapiPlugin } = require("electrode-hapi-compat");
function electrodeCookiesRegister(server, options, next) {
function setResponseStates(request, r) {
// istanbul ignore else
if (request.app.replyStates) {
each(request.app.replyStates, (state, name) => {
r.state(name, state.value, state.options);
});
}
}
function hapi17(server, options) {
server.ext("onPreResponse", (request, h) => {
setResponseStates(request, h);
return h.continue;
});
}
function hapi16(server, options, next) {
server.ext("onPreResponse", (request, reply) => {
if (request.app.replyStates) {
each(request.app.replyStates, (state, name) => {
reply.state(name, state.value, state.options);
});
}
setResponseStates(request, reply);
return reply.continue();

@@ -19,8 +31,10 @@ });

electrodeCookiesRegister.attributes = {
pkg: require("./package.json")
};
const pkg = require("./package.json");
module.exports = {
register: electrodeCookiesRegister
};
module.exports = universalHapiPlugin(
{
hapi16,
hapi17
},
pkg
);
{
"name": "electrode-cookies",
"version": "1.0.3",
"version": "1.0.4",
"description": "Electrode ISO cookies lib",

@@ -23,3 +23,4 @@ "main": "lib/index.js",

"dependencies": {
"lodash": "^4.14.1"
"electrode-hapi-compat": "^1.0.0",
"lodash": "^4.17.11"
},

@@ -29,3 +30,3 @@ "devDependencies": {

"electrode-archetype-njs-module-dev": "^2.2.0",
"electrode-server": "^1.2.2",
"electrode-server": "^2.0.0",
"eslint-config-prettier": "^2.3.0",

@@ -52,5 +53,6 @@ "jsdom": "^9.4.2",

"dist",
"test"
"test",
"cookies-js"
]
}
}
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