mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
change function name correctly in index.js (#26850)
* change function name correctly in index.js * Update index.js Co-authored-by: 偏右 <afc163@gmail.com>
This commit is contained in:
parent
cc37f7d189
commit
14ef846eb7
4
index.js
4
index.js
@ -1,5 +1,5 @@
|
|||||||
/* eslint no-console:0 */
|
/* 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());
|
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
|
// message & notification should not be capitalized
|
||||||
exports[match[1]] = v;
|
exports[match[1]] = v;
|
||||||
} else {
|
} else {
|
||||||
exports[camelCase(match[1])] = v;
|
exports[pascalCase(match[1])] = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user