UNPKG

398 BJavaScriptView Raw
1"use strict";
2
3// Copyright 2017-2018 Jaco Greeff
4// This software may be modified and distributed under the terms
5// of the ISC license. See the LICENSE file for details.
6module.exports = async function send({
7 requests,
8 storage
9}, method, params) {
10 if (!requests[method]) {
11 throw new Error(`provider.send: Invalid method '${method}'`);
12 }
13
14 return requests[method](storage, params);
15};
\No newline at end of file