mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-03 07:23:55 +00:00
Strip accents from strings so they can be displayed in marquee etc (#722)
This commit is contained in:
parent
41539ce7e2
commit
2b2598329d
3 changed files with 14 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import React from "react";
|
||||
import deburr from "lodash/deburr";
|
||||
|
||||
interface Props {
|
||||
children: string | number;
|
||||
|
|
@ -6,8 +7,7 @@ interface Props {
|
|||
}
|
||||
|
||||
export const characterClassName = (char: string | number) =>
|
||||
`character-${char
|
||||
.toString()
|
||||
`character-${deburr(char.toString())
|
||||
.toLowerCase()
|
||||
.charCodeAt(0)}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
"@types/invariant": "^2.2.29",
|
||||
"@types/jest": "^23.3.2",
|
||||
"@types/lodash": "^4.14.116",
|
||||
"@types/lodash-es": "^4.17.1",
|
||||
"@types/rc-slider": "^8.6.0",
|
||||
"@types/react": "^16.4.18",
|
||||
"@types/react-dom": "^16.0.9",
|
||||
|
|
@ -98,7 +99,6 @@
|
|||
"jest-puppeteer": "^3.0.1",
|
||||
"jest-runner-eslint": "^0.4.0",
|
||||
"jszip": "^3.1.3",
|
||||
"lodash": "^4.17.11",
|
||||
"milkdrop-preset-converter-aws": "^0.1.6",
|
||||
"music-metadata-browser": "^0.6.1",
|
||||
"prettier": "^1.15.3",
|
||||
|
|
@ -141,6 +141,7 @@
|
|||
},
|
||||
"prettier": {},
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.11",
|
||||
"stereo-panner-node": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
10
yarn.lock
10
yarn.lock
|
|
@ -660,6 +660,16 @@
|
|||
version "23.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.2.tgz#07b90f6adf75d42c34230c026a2529e56c249dbb"
|
||||
|
||||
"@types/lodash-es@^4.17.1":
|
||||
version "4.17.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.1.tgz#56745e5411558362aeca31def918f88f725dd29d"
|
||||
dependencies:
|
||||
"@types/lodash" "*"
|
||||
|
||||
"@types/lodash@*":
|
||||
version "4.14.120"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.120.tgz#cf265d06f6c7a710db087ed07523ab8c1a24047b"
|
||||
|
||||
"@types/lodash@^4.14.116":
|
||||
version "4.14.116"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue