Created
March 22, 2021 08:30
-
-
Save roshanca/d3f46a61da93b6c3f771b920b525834c to your computer and use it in GitHub Desktop.
首字母大写转换
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 首字母大写转换 | |
* @param {string} word | |
*/ | |
export const firstUpperCase = ([first, ...rest]) => | |
first.toUpperCase() + rest.join(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment