Last active
August 5, 2020 21:26
-
-
Save jasp402/2a72358a90bd433cd15e700d62190def to your computer and use it in GitHub Desktop.
JS-PackTools | capitalLetter
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
const { capitalLetter } = require('js-packtools')(); | |
//ππ» Capitalize only the first letter | |
capitalLetter('hello word'); //β Hello word | |
//ππ» Capitalize all the first letter of each word in the sentence | |
capitalLetter('hello word', true); //β Hello Word | |
//π‘ ---- tips: you can use prototyping ---- | |
//ππ» Capitalize only the first letter | |
'hello word'.capitalLetter(); //β Hello word | |
//ππ» Capitalize all the first letter of each word in the sentence | |
'hello word'.capitalLetter(true); //β Hello Word | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment