Skip to content

Instantly share code, notes, and snippets.

@rnmhdn
Created September 29, 2019 16:09
Show Gist options
  • Save rnmhdn/494d2e77876164932a6bf2f603383294 to your computer and use it in GitHub Desktop.
Save rnmhdn/494d2e77876164932a6bf2f603383294 to your computer and use it in GitHub Desktop.
Vuejs filter to convert english digits to Persian.
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