mirror of
https://github.com/zoriya/flood.git
synced 2025-12-21 14:45:14 +00:00
Switch entirely to fat arrow functions
This commit is contained in:
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user