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

hapi-stateless-notifications

Package Overview
Dependencies
Maintainers
17
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-stateless-notifications - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

14

index.js

@@ -21,5 +21,5 @@ var P = require('bluebird');

});
}).catch(function(errorNotice) {
}).catch(function(error) {
return P.resolve({
notice: errorNotice,
notice: error.message,
type: 'error'

@@ -39,7 +39,5 @@ });

var facilitator = new TokenFacilitator({
redis: request.redis
});
var facilitator = new TokenFacilitator({redis: request.redis});
P.promisify(facilitator.read, facilitator)(request.query.notice, {
P.promisify(facilitator.read, {context: facilitator})(request.query.notice, {
prefix: options.prefix || 'notice:'

@@ -102,5 +100,3 @@ }).then(function(data) {

});
return P.promisify(facilitator.generate, facilitator)({
notices: notices
}, {
return P.promisify(facilitator.generate, {context: facilitator})({notices: notices}, {
timeout: options.timeout || 3600,

@@ -107,0 +103,0 @@ prefix: options.prefix || 'notice:'

{
"name": "hapi-stateless-notifications",
"version": "2.1.0",
"version": "3.0.0",
"description": "A simple, explicit-state plugin to pass notices between pages.",

@@ -20,4 +20,3 @@ "main": "index.js",

"dependencies": {
"bluebird": "^2.10.2",
"promise.allrejected": "^1.0.0",
"bluebird": "^3.0.5",
"token-facilitator": "^2.2.0"

@@ -24,0 +23,0 @@ },

@@ -35,3 +35,3 @@ hapi-stateless-notifications

Promise.resolve('Success message here ...'),
Promise.reject('Error message here ...'),
Promise.reject(new Error('Error message here ...')),
]).then(function (token) {

@@ -38,0 +38,0 @@ // if there's a token, put it in the query of the page you load next as `notice={token}`

@@ -30,5 +30,5 @@ var test = require('tap').test;

Promise.resolve('yay'),
Promise.reject('boom'),
Promise.reject(''),
Promise.resolve()
Promise.reject(new Error('boom')),
Promise.reject(new Error('')),
Promise.resolve(),
]).then(function (token) {

@@ -35,0 +35,0 @@ t.ok(token, 'got token');

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