diff --git a/netlify/functions/examples_api_cache_query/examples_api_cache_query.js b/netlify/functions/examples_api_cache_query/examples_api_cache_query.js index e34242bd134..06efefed6d2 100755 --- a/netlify/functions/examples_api_cache_query/examples_api_cache_query.js +++ b/netlify/functions/examples_api_cache_query/examples_api_cache_query.js @@ -1,10 +1,10 @@ const {STYLE} = require('../cache.js'); -function htmlEncode(str) { - return String(str).replace(/[^\w. ]/gi, function(c){ - return '&#' + c.charCodeAt(0) + ';'; +const htmlEncode = (str) => { + return String(str).replace(/[^\w. ]/gi, (c) => { + return `&#${c.charCodeAt(0)};`; }); -} +}; const handler = async (ev) => { const queryString = JSON.stringify(ev.queryStringParameters, null, 2);