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

dubstep

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

dubstep

A simple two step view pattern for expressjs

  • 0.0.1
  • latest
  • npm
  • Socket score

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

Dub Step

A kind of response middleware for expressjs.

Example step recipes coming soon.

A basic step used to set HTML title

  var title = function( title, function(req, res, step){
    res.title = 'Company -- ' + title;
    step();
  });

A view renderer

  var html = function(req, res, step){
    res.send( '<html><title>'+res.title+'</title><body><h1>'+res.title+'</h1></html>' );
  };
app.get('/home', function(req, res){
  res.dub.step( title( 'Home Page' ) )
         .step( html )
         .step();
});

Run Tests

npm test

License

Released under the MIT(Poetic) Software license

This work 'as-is' we provide.
No warranty express or implied.
Therefore, no claim on us will abide.
Liability for damages denied.

Permission is granted hereby,
to copy, share, and modify.
Use as is fit,
free or for profit.
These rights, on this notice, rely. 

FAQs

Package last updated on 20 Jan 2013

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