2017-04-19 23:11:37 +02:00
|
|
|
class Helper {
|
|
|
|
constructor () {
|
|
|
|
this.addHelpfulPrototypes();
|
|
|
|
}
|
|
|
|
|
|
|
|
addHelpfulPrototypes () {
|
2017-04-26 07:13:59 +02:00
|
|
|
String.prototype.capitalize = function () {
|
|
|
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
|
|
}
|
|
|
|
String.prototype.replaceAt = function (index, replacement) {
|
|
|
|
return this.substr(0, index) + replacement + this.substr(index + replacement.length);
|
2017-04-19 23:11:37 +02:00
|
|
|
}
|
|
|
|
}
|
2017-04-23 01:05:36 +02:00
|
|
|
|
2017-04-26 07:13:59 +02:00
|
|
|
characterIsUppercase (character) {
|
|
|
|
return character === character.toUpperCase();
|
2017-04-23 01:05:36 +02:00
|
|
|
}
|
2017-04-19 23:11:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default new Helper;
|