Easily add plugin support to your node.js application.


Easily add plugin support to your node.js application.

A different take on plugin handling! This is not a middleware system, if you need something that handles async middleware, ware is great for that.

Install with npm

$ npm i use --save
var use = require('use');

See the examples folder for usage examples.


Define a plugin function to be passed to use. The only parameter exposed to the plugin is app, the object or function. passed to use(app). app is also exposed as this in plugins.

Additionally, if a plugin returns a function, the function will be pushed onto the fns array, allowing the plugin to be called at a later point by the run method.


  • fn {Function}: plugin function to call


var use = require('use');
// define a plugin 
function foo(app) {
  // do stuff 
var app = function(){};
// register plugins 


Run all plugins on fns. Any plugin that returns a function when called by use is pushed onto the fns array.


  • value {Object}: Object to be modified by plugins.
  • returns {Object}: Returns the object passed to run


var config = {};;
  • base-methods: Starter for creating a node.js application with a handful of common methods, like set, get,… more | homepage
  • ware: Easily create your own middleware layer. | homepage

Install dev dependencies:

$ npm i -d && npm test

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Jon Schlinkert

Copyright © 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on November 10, 2015.