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'
})

/metalman-action/

    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