1.4.2 • Published 2 years ago

ut-function.dispatch v1.4.2

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
2 years ago

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);
};
1.4.2

2 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago