You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.8 KiB

2 years ago
{"ast":null,"code":"const persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],\n arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],\n fixNumbers = function (str) {\n if (typeof str === \"string\") {\n for (var i = 0; i < 10; i++) {\n str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);\n }\n }\n\n return str;\n};\n\nexport default fixNumbers;","map":{"version":3,"names":["persianNumbers","arabicNumbers","fixNumbers","str","i","replace"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/AnimatedInput/fixNumbers.js"],"sourcesContent":["const persianNumbers = [\n /۰/g,\n /۱/g,\n /۲/g,\n /۳/g,\n /۴/g,\n /۵/g,\n /۶/g,\n /۷/g,\n /۸/g,\n /۹/g,\n ],\n arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],\n fixNumbers = function (str) {\n if (typeof str === \"string\") {\n for (var i = 0; i < 10; i++) {\n str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);\n }\n }\n return str;\n };\nexport default fixNumbers;\n"],"mappings":"AAAA,MAAMA,cAAc,GAAG,CACnB,IADmB,EAEnB,IAFmB,EAGnB,IAHmB,EAInB,IAJmB,EAKnB,IALmB,EAMnB,IANmB,EAOnB,IAPmB,EAQnB,IARmB,EASnB,IATmB,EAUnB,IAVmB,CAAvB;AAAA,MAYEC,aAAa,GAAG,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,EAA+B,IAA/B,EAAqC,IAArC,EAA2C,IAA3C,EAAiD,IAAjD,EAAuD,IAAvD,CAZlB;AAAA,MAaEC,UAAU,GAAG,UAAUC,GAAV,EAAe;EAC1B,IAAI,OAAOA,GAAP,KAAe,QAAnB,EAA6B;IAC3B,KAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAG,EAApB,EAAwBA,CAAC,EAAzB,EAA6B;MAC3BD,GAAG,GAAGA,GAAG,CAACE,OAAJ,CAAYL,cAAc,CAACI,CAAD,CAA1B,EAA+BA,CAA/B,EAAkCC,OAAlC,CAA0CJ,aAAa,CAACG,CAAD,CAAvD,EAA4DA,CAA5D,CAAN;IACD;EACF;;EACD,OAAOD,GAAP;AACD,CApBH;;AAqBA,eAAeD,UAAf"},"metadata":{},"sourceType":"module"}