ut-function.dispatch

1.4.2 • Public • Published

ut-dispatch

Easily expose backend methods through script port.

Usage

Implied namespaces:

const dispatch = require('ut-function.dispatch');
module.exports = function({utMethod}) {
    return dispatch({
        'external.identity': utMethod('internal.identity.check'),
        'external.message': utMethod('internal.message.receive')
    })(...arguments);
};

Provide namespace explicitly:

const dispatch = require('ut-function.dispatch');
module.exports = function({utMethod}) {
    return dispatch({
        namespace: 'external',
        methods: {
            'external.identity': utMethod('internal.identity.check'),
            'external.message': utMethod('internal.message.receive')
        }
    })(...arguments);
};

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.2
    0
    • latest

Version History

Package Sidebar

Install

npm i ut-function.dispatch

Weekly Downloads

0

Version

1.4.2

License

Apache-2.0

Unpacked Size

5.99 kB

Total Files

6

Last publish

Collaborators

  • kalin.krustev