Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.04 KB

README.md

File metadata and controls

29 lines (21 loc) · 1.04 KB

trooba-plugin

codecov Build Status NPM Downloads Known Vulnerabilities

The module provides a way to assign trooba plugins or handlers with necessary attributes required by trooba as well as specify trooba version that plugin requires.

Install

npm install trooba-plugin -S

Usage

const plugin = require('trooba-plugin');

function myPlugin(pipe) {
    pipe.on('request', () => {});
}

module.exports = plugin(myPlugin, {
    troobaVersion: '^2',
    runtime: 'generic'
})