diff --git a/examples/pokedex/adapter.js b/examples/pokedex/adapter.js index af541f5e..8e8ea9b4 100644 --- a/examples/pokedex/adapter.js +++ b/examples/pokedex/adapter.js @@ -214,6 +214,14 @@ function reqToJson(req, requestTime) { jsonBody: jsonBody, }; } + +function paramsToObject(entries) { + const result = {}; + for (const [key, value] of entries) { + result[key] = value; + } + return result; +} `; }