Socket
Socket
Sign inDemoInstall

request-properties

Package Overview
Dependencies
1
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    request-properties

A connect/express middleware for loading request properties


Version published
Maintainers
2
Created

Readme

Source

request-properties

npm install request-properties Circle CI

Usage

var properties = require('request-properties');

app.use(properties({
  someFunctionValue: function() {
    return 'some value';
  },
  someDirectProperty: 1234,
  somePromiseResponse: function(req) {
    return Promise.resolve('some database response');
  }
}));

app.get('/', function(req, res) {
  console.log(req.someFunctionValue); // 'some value'
  console.log(req.someDirectProperty); // 1234
  console.log(req.somePromiseResponse); // 'some database response'
  res.end();
});

Development

  • git clone this repository
  • npm install

Running Tests

  • npm run test

FAQs

Last updated on 08 Jun 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc