Skip to content

Commit

Permalink
Merge pull request #4 from matchai/master
Browse files Browse the repository at this point in the history
Fix statuses with underscores
  • Loading branch information
joshstar authored Dec 19, 2017
2 parents db09660 + 391fdf4 commit 477db77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/media/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ const query = require("./query");
const discordMessage = require("../discordMessage");

const capitalize = str =>
str.charAt(0).toUpperCase() + str.substring(1).toLowerCase();
str
.split("_")
.map(
word =>
word.charAt(0).toUpperCase() + word.substring(1).toLowerCase()
)
.join(" ");

const search = async (searchArg, type) => {
const response = await api(query, {
Expand Down

0 comments on commit 477db77

Please sign in to comment.