summaryrefslogtreecommitdiff
path: root/source/github-helpers
diff options
context:
space:
mode:
authorGravatar yakov116 <16872793+yakov116@users.noreply.github.com> 2020-06-26 04:30:43 -0400
committerGravatar GitHub <noreply@github.com> 2020-06-26 10:30:43 +0200
commitc6c727ca571c91d1ff426e218ccadb075cdb2af6 (patch)
treee1855bb6c6d37f0b28b97be73192316fec2067e5 /source/github-helpers
parent15da229b3a29483f076782361ac429854f18e18b (diff)
downloadrefined-github-c6c727ca571c91d1ff426e218ccadb075cdb2af6.tar.gz
refined-github-c6c727ca571c91d1ff426e218ccadb075cdb2af6.tar.zst
refined-github-c6c727ca571c91d1ff426e218ccadb075cdb2af6.zip
Lint and avoid errors (#3256)
Diffstat (limited to 'source/github-helpers')
-rw-r--r--source/github-helpers/index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/github-helpers/index.ts b/source/github-helpers/index.ts
index 7f79612d..0eea0b02 100644
--- a/source/github-helpers/index.ts
+++ b/source/github-helpers/index.ts
@@ -65,7 +65,7 @@ export function compareNames(username: string, realname: string): boolean {
* @param {string} selector A css selector.
*/
export function getScopedSelector(selector: string): string {
- return selector.split(',').map(sub => `:scope > ${sub.trim()}`).join(',');
+ return selector.split(',').map(sub => `:scope > ${sub.trim()}`).join();
}
export function looseParseInt(text: string): number {
@@ -109,3 +109,8 @@ export function preventPrCommitLinkLoss(url: string, pr: string, commit: string,
return `[\`${commit}\` (#${pr})](${url})`;
}
+
+// https://github.com/idimetrix/text-case/blob/master/packages/upper-case-first/src/index.ts
+export function upperCaseFirst(input: string): string {
+ return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
+}