From 14ef846eb75d28353d9d67e15c0fb08441e36945 Mon Sep 17 00:00:00 2001 From: chequerNoel <67718949+chequerNoel@users.noreply.github.com> Date: Fri, 25 Sep 2020 12:22:02 +0900 Subject: [PATCH] change function name correctly in index.js (#26850) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * change function name correctly in index.js * Update index.js Co-authored-by: 偏右 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 465ade6fd6..0a58333efa 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /* eslint no-console:0 */ -function camelCase(name) { +function pascalCase(name) { return name.charAt(0).toUpperCase() + name.slice(1).replace(/-(\w)/g, (m, n) => n.toUpperCase()); } @@ -17,7 +17,7 @@ req.keys().forEach(mod => { // message & notification should not be capitalized exports[match[1]] = v; } else { - exports[camelCase(match[1])] = v; + exports[pascalCase(match[1])] = v; } } }); -- GitLab