Created
September 29, 2019 16:09
-
-
Save rnmhdn/494d2e77876164932a6bf2f603383294 to your computer and use it in GitHub Desktop.
Vuejs filter to convert english digits to Persian.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.filter('persianize', strr => strr.replace(/\d/g, d => '۰۱۲۳۴۵۶۷۸۹'[d])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment