Jquery >= 2.2.4
<head>
<script src="https://code.jquery.com/jquery-2.2.4.min.js" ></script>
<script src="/rena.me.min.js"></script>
</head>
var person_name = new RenaME('anderson hese')
var complex_name = new RenaME('juquinha da silva lopes')
person_name.capitalize().toString() // output > 'Anderson Hese'
complex_name.capitalize().toString() // output > 'Juquinha da Silva Lopes'
var person_name = new RenaME('juquinha da silva lopes')
person_name.getCardLike().toString() // output > 'Juquinha S Lopes'
person_name.getCardLike({dot: true}).toString() // output > 'Juquinha S. Lopes'
var person_name = new RenaME('juquinha da silva lopes')
person_name.getFirstName().toString() // output > 'juquinha'
person_name.getFirstName().capitalize().toString() // output > 'Juquinha'
var person_name = new RenaME('juquinha da silva lopes')
person_name.getMiddleName().toString() // output > 'silva'
person_name.getMiddleName().capitalize().toString() // output > 'Silva'
var person_name = new RenaME('juquinha da silva lopes')
person_name.getLastName().toString() // output > 'pereira'
person_name.getLastName().capitalize().toString() // output > 'Lopes'
<div>
<input class="rena-me" data-rename-mask="getCardLike"></input>
<script>
var cntrl = new RenaME({input: $('.rena-me')});
</script>
</div>
<div>
<input class="rena-me-with-label" data-rename-label=".rena-me-label"></input>
<label class="rena-me-label" data-rename-mask="getCardLike"></label>
<script>
var cntrl = new RenaME({input: $('.rena-me-with-label')});
</script>
</div>
- Anderson hese - GITHub
This project is licensed under the MIT License - see the LICENSE.md file for details