metalman-action

1.1.0 • Public • Published

metalman-action

Greenkeeper badge

An action middleware for the metalman module.

var metalman = require('metalman')
var action = require('metalman-action')
var command = metalman([action])

var func = command({
    action: function (cmd, callback) {
        console.log(cmd) // {foo: 'bar'}
        callback(null, cmd.foo)
    }
})

func({foo: 'bar'}, function (err, res) {
    // err == null
    // res == 'bar'
})

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.00
1.0.00

Package Sidebar

Install

npm i metalman-action

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

3.8 kB

Total Files

4

Last publish

Collaborators

  • marcbachmann