Compare commits

...

2 Commits

Author SHA1 Message Date
ThePendulum 4910f8650f 1.102.3 2020-02-26 04:10:04 +01:00
ThePendulum 51ffcb5be7 Added opt-out trim to capitalize util. 2020-02-26 04:10:01 +01:00
3 changed files with 6 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.102.2",
"version": "1.102.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.102.2",
"version": "1.102.3",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -1,10 +1,12 @@
'use strict';
function capitalize(string) {
return string
function capitalize(string, trim = true) {
const capitalized = string
.split(/\s/)
.map(component => `${component.charAt(0).toUpperCase()}${component.slice(1)}`)
.join(' ');
return trim ? capitalized.trim() : capitalized;
}
module.exports = capitalize;