Skip to content

Instantly share code, notes, and snippets.

@bahar-Agi
bahar-Agi / en2fa.js
Created April 8, 2013 09:24 — forked from eAmin/en2fa.js
/*
* English digit to persian
* Copyright(C) 2009 by Amin Akbari [ http://eAmin.me/ ]
* Licensed under the MIT Style License [http://www.opensource.org/licenses/mit-license.php]
*
*/
String.prototype.toFaDigit = function() {
return this.replace(/\d+/g, function(digit) {
var ret = '';