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

express-promise-router

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-promise-router - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

lib/express-promise-router.js

@@ -64,3 +64,3 @@ var Router = require('express').Router;

var args = _.map(arguments, function (arg, idx) {
if (idx === 0 && 'string' === typeof arg) {
if (idx === 0 && 'string' === typeof arg || arg instanceof RegExp) {
return arg;

@@ -67,0 +67,0 @@ }

{
"name": "express-promise-router",
"version": "0.0.1",
"version": "0.0.2",
"main": "lib/express-promise-router.js",

@@ -5,0 +5,0 @@ "description": "A lightweight wrapper for Express 4's Router that allows middleware to return promises",

@@ -1,2 +0,2 @@

# express-controller [![Build Status](https://secure.travis-ci.org/alex-whitney/express-controller.png?branch=master)](http://travis-ci.org/alex-whitney/express-controller)
# express-promise-router

@@ -6,7 +6,9 @@ The best module ever.

## Getting Started
Install the module with: `npm install express-controller`
Install the module with: `npm install express-promise-router`
```javascript
var express-controller = require('express-controller');
express-controller.awesome(); // "awesome"
var PromiseRouter = require('express-promise-router');
/* Coming eventually */
```

@@ -13,0 +15,0 @@

@@ -207,2 +207,15 @@ 'use strict';

it('should bind to RegExp routes', function (done) {
var fn1 = function (req, res) {
res.send();
};
router.get(/^\/foo/, fn1);
bootstrap(router).then(function () {
return GET('/foo');
}).then(done, done);
});
});
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