express-stickyforms
Advanced tools
Comparing version 0.0.1 to 1.0.0
24
index.js
@@ -1,18 +0,16 @@ | ||
module.exports = function() { | ||
module.exports = function(req, res, next) { | ||
return function(req, res, next) { | ||
if (typeof req.session.sticky === 'undefined') { | ||
res.locals.sticky = {}; | ||
} else { | ||
res.locals.sticky = req.session.sticky; | ||
delete req.session.sticky; | ||
} | ||
if (typeof req.session.sticky === 'undefined') { | ||
res.locals.sticky = {}; | ||
} else { | ||
res.locals.sticky = req.session.sticky; | ||
delete req.session.sticky; | ||
} | ||
req.sticky = function() { | ||
req.session.sticky = req.body; | ||
}; | ||
next(); | ||
req.sticky = function() { | ||
req.session.sticky = req.body; | ||
}; | ||
next(); | ||
}; |
{ | ||
"name": "express-stickyforms", | ||
"version": "0.0.1", | ||
"version": "1.0.0", | ||
"description": "Persistent form middleware for express.", | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/emilioTe/express-stickyforms", |
# express-stickyforms | ||
version 0.0.1 | ||
version **1.0.0** | ||
@@ -36,3 +36,3 @@ | ||
// | ||
app.use(require('stickyforms')()); | ||
app.use(require('express-stickyforms')); | ||
@@ -39,0 +39,0 @@ app.use(app.router); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
3845
12