Created
January 13, 2020 07:09
-
-
Save hagi4u/0535dcb7041a5b19da053f61611f34f2 to your computer and use it in GitHub Desktop.
This file contains 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
/* | |
* 쉼표 단위의 숫자로 아웃픗을 내야 하는 헬퍼 | |
*/ | |
export function numberWithCommas(x) { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment