UNPKG

vue-hooks-plus

Version:
14 lines (13 loc) 321 B
const withArgs = (hook, use) => { return function useRequestArgs(service, options = {}, plugins = []) { let next = hook; const middleware = use || []; for (let i = middleware.length; i--; ) { next = middleware[i](next); } return next(service, options, plugins); }; }; export { withArgs };