Change lettersToSpan name to charsToSpan

This commit is contained in:
2020-03-24 19:44:42 +01:00
parent 3d9702db33
commit 846c575f1d
3 changed files with 8 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ export function throttle (fn, delay) {
/*
** Wrap string's each letters into a span
*/
export const lettersToSpan = string => {
export const charsToSpan = string => {
return string
.replace(/(<.*?>)|(.)/g, letter => letter.replace(/./g, '<span>$&</span>'))
.replace(/ /g, '\u00a0')