Switch entirely to fat arrow functions

This commit is contained in:
John Furrow
2016-03-19 12:46:11 +01:00
parent 14ed9bb1f5
commit e77dfac3ae
33 changed files with 145 additions and 159 deletions

View File

@@ -1,11 +1,11 @@
'use strict';
let stringUtil = {
capitalize: function (string) {
capitalize: (string) => {
return string.charAt(0).toUpperCase() + string.slice(1);
},
pluralize: function (string, count) {
pluralize: (string, count) => {
if (count !== 1) {
if (string.charAt(string.length - 1) === 'y') {
return `${string.substring(0, string.length - 1)}ies`;