Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Module dependencies.
*/
var format = require('util').format;
var isArray = require('util').isArray;


/**
Expand Down Expand Up @@ -64,7 +63,7 @@ function _flash(type, msg) {
if (arguments.length > 2 && format) {
var args = Array.prototype.slice.call(arguments, 1);
msg = format.apply(undefined, args);
} else if (isArray(msg)) {
} else if (Array.isArray(msg)) {
msg.forEach(function(val){
(msgs[type] = msgs[type] || []).push(val);
});
Expand Down
165 changes: 165 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 16 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"name": "connect-flash",
"version": "0.1.1",
"description": "Flash message middleware for Connect.",
"keywords": ["connect", "express", "flash", "messages"],
"keywords": [
"connect",
"express",
"flash",
"messages"
],
"repository": {
"type": "git",
"url": "git://github.com/jaredhanson/connect-flash.git"
Expand All @@ -15,18 +20,20 @@
"email": "jaredhanson@gmail.com",
"url": "http://www.jaredhanson.net/"
},
"licenses": [ {
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
} ],
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"main": "./lib",
"dependencies": {
},
"devDependencies": {
"vows": "0.6.x"
"vows": "^0.8.3"
},
"scripts": {
"test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js"
},
"engines": { "node": ">= 0.4.0" }
"engines": {
"node": ">= 0.4.0"
}
}