Skip to content

Commit

Permalink
digit norm (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanve authored Jul 21, 2021
1 parent a22caf7 commit 3c88ff3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
var norm = "".normalize

function grapheme(txt) {
return norm.call(txt, "NFD").replace(glyph, "")
return digit.test(txt) ? "" + txt :
norm.call(txt, "NFD").replace(glyph, "")
}

function modulo(n) {
Expand Down

0 comments on commit 3c88ff3

Please sign in to comment.