Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default function(str) {
- return str.replace(/\w\S*/g, function(txt) {
- return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement