mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 01:13:48 +01:00
Add toUpperCase function (#2697)
This commit is contained in:
parent
545a19e378
commit
223fb7cbd3
@ -1,4 +1,4 @@
|
|||||||
import { capitalize } from "../../../prelude/string";
|
import { capitalize, toUpperCase } from "../../../prelude/string";
|
||||||
|
|
||||||
function escape(text: string) {
|
function escape(text: string) {
|
||||||
return text
|
return text
|
||||||
@ -92,7 +92,7 @@ const _keywords = [
|
|||||||
|
|
||||||
const keywords = _keywords
|
const keywords = _keywords
|
||||||
.concat(_keywords.map(capitalize))
|
.concat(_keywords.map(capitalize))
|
||||||
.concat(_keywords.map(k => k.toUpperCase()))
|
.concat(_keywords.map(toUpperCase))
|
||||||
.sort((a, b) => b.length - a.length);
|
.sort((a, b) => b.length - a.length);
|
||||||
|
|
||||||
const symbols = [
|
const symbols = [
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
export function capitalize(s: string): string {
|
export function capitalize(s: string): string {
|
||||||
return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
|
return toUpperCase(s.charAt(0)) + s.slice(1).toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
export function toUpperCase(s: string): string {
|
||||||
|
return s.toUpperCase();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user