Skip to content

Instantly share code, notes, and snippets.

View hbehkamal's full-sized avatar
🎯
Focusing

Hosein BehKamal hbehkamal

🎯
Focusing
  • Linquip.com
  • Middle East
View GitHub Profile
@AliMD
AliMD / fix-persian-number.js
Last active August 10, 2022 19:16
Convert/Fix persian and arabic numbers inside a string to english in javascript, AliMD Edition ;)
(() => {
'use strict';
const
// Establish the root object, `window` (`self`) in the browser, `global`
// on the server, or `this` in some virtual machines. We use `self`
// instead of `window` for `WebWorker` support.
root = (() => {
if (typeof self == 'object' && self.self === self) return self;
else if (typeof global == 'object' && global.global === global) return global;