Compare commits
2 Commits
c7fac575e4
...
4910f8650f
Author | SHA1 | Date |
---|---|---|
|
4910f8650f | |
|
51ffcb5be7 |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.102.2",
|
"version": "1.102.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.102.2",
|
"version": "1.102.3",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function capitalize(string) {
|
function capitalize(string, trim = true) {
|
||||||
return string
|
const capitalized = string
|
||||||
.split(/\s/)
|
.split(/\s/)
|
||||||
.map(component => `${component.charAt(0).toUpperCase()}${component.slice(1)}`)
|
.map(component => `${component.charAt(0).toUpperCase()}${component.slice(1)}`)
|
||||||
.join(' ');
|
.join(' ');
|
||||||
|
|
||||||
|
return trim ? capitalized.trim() : capitalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = capitalize;
|
module.exports = capitalize;
|
||||||
|
|
Loading…
Reference in New Issue