未验证 提交 14ef846e 编写于 作者: C chequerNoel 提交者: GitHub

change function name correctly in index.js (#26850)

* change function name correctly in index.js

* Update index.js
Co-authored-by: N偏右 <afc163@gmail.com>
上级 cc37f7d1
/* 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;
}
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册