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

res-promises

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

res-promises

Express middleware that adds promises object and render method that waits for promises

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

Purpose

This middleware adds two properties to express's res object:

  • promises - empty object for other middlewares to store promises on
  • renderAfterPromises - method which waits for all promises on res.promises to resolve before calling res.render with promise resolutions

Install

npm install res-promises

Use

const express = require('express');
const resPromises = require('res-promises');

const app = express();

app.use(resPromises())

See example dir for how to use with other middleware.

Options

  • resPromises([overrideResRender]) - boolean to override res's render method. Default method name is renderAfterPromises

Keywords

FAQs

Package last updated on 08 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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