vbarzokas / greek-utils

A JavaScript library for Greek language with utilities such as replacement of accented and other diacritics characters, conversion from Greek to phonetic, transliterated or greeklish Latin and more.
MIT License
93 stars 7 forks source link

Refactoring replaceText() #5

Closed Vagelis-Prokopiou closed 6 years ago

Vagelis-Prokopiou commented 6 years ago

Γεια σου Βασίλη. Πολύ ωραίο το module σου. Έκανα μια αλλαγή στην replaceText() function, γιατί ο (non-Babel) Webpack έβγαζε πρόβλημα: "ERROR in bundle.js from UglifyJs. Unexpected token name «of», expected punc «; »". Έκανα μια απλή Array.forEach. Εάν σε ενδιαφέρει το ενσωματώνεις. Thanx.

vbarzokas commented 6 years ago

Hi, thanks for the change. for..of is a feature of ES2015 so the script will not run on environments that do not support it.

I would accept that pull request for backwards compatibility, but besides the replacement of for..of with forEach, you have also removed the ignore parameter from the function replaceText. The unit test are failing because of that. Can you please re introduce it and make sure that the tests are passing?

Vagelis-Prokopiou commented 6 years ago

You are right. I will open a new one. Thanx.