Skip to content

Commit

Permalink
Merge pull request #1 from baboon-king/main
Browse files Browse the repository at this point in the history
chore: fix typo
  • Loading branch information
akira-cn authored Aug 11, 2023
2 parents 7b8c85c + f735f23 commit 3186db4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modular.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const sourePrefix = `
const sourcePrefix = `
function makeRpc(url, func) {
return async(...args) => {
const ret = await fetch(url, {
Expand All @@ -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}');`);
}
Expand Down Expand Up @@ -61,4 +61,4 @@ export function modular(rpcs, {getParams, getUrl, getContext, setContentType, se
};
}

export default modular;
export default modular;

0 comments on commit 3186db4

Please sign in to comment.