diff --git a/src/modular.js b/src/modular.js index e1d5b51..f12b20b 100644 --- a/src/modular.js +++ b/src/modular.js @@ -1,4 +1,4 @@ -const sourePrefix = ` +const sourcePrefix = ` function makeRpc(url, func) { return async(...args) => { const ret = await fetch(url, { @@ -20,7 +20,7 @@ function makeRpc(url, func) { `; function buildModule(rpcs, url) { - let source = [sourePrefix]; + let source = [sourcePrefix]; for(const key of Object.keys(rpcs)) { source.push(`export const ${key} = makeRpc('${url}', '${key}');`); } @@ -61,4 +61,4 @@ export function modular(rpcs, {getParams, getUrl, getContext, setContentType, se }; } -export default modular; \ No newline at end of file +export default modular;