Closed gangadharjannu closed 6 years ago
Thank you for this pull request. Can you please tell me more about what the goal of this change is? Are you fixing a specific bug? Adding a new feature? Just refactoring the code?
HI @zgrossbart I have removed the dependency of underscore.js which weighs around 20Kb. Yes, I would say this as refactoring.
Saving 20 kb is great, but it looks like you made a lot more changes than that. Can you please let me know more about the changes you made. Also, what browsers have you tested on? What about older version?
Before answering your question. Can you tell me the current browser support?
I'm trying to support Chrome latest, Safari latest, Firefox latest, IE, and Edge. I'm also trying to make sure it works well on all mobile devices.
I've tested in all evergreen browsers. Please refer Browser_compatibility section in my first comment to see the browser compatibility. I'm supporting all evergreen browsers including IE11. In addition to that I've added the required polyfills for cross browser compatibility. So it should work across all the devices.
Regarding the changes
I already mentioned in my first comment. Most changes are related to code indentation as per airbnb style guide.
Kindly see the diffs by removing whitespace in diff settings. I've indented as per airbnb style guide. If you want I can remove the indentation changes and will just push my changes.
Mostly the changes that you suggested are from rock solid polyfills provided by Mozilla. The other change regarding jdd namespace is feasible and in fact I wanted to do so. However as I explained in my comment I defined outside just for separating concerns.
created two utility functions
Replaced below methods:
_.isObject, _.isString, _.isNumber, _.isBoolean, _.isNull, _.isArray
with custom getType method_.each
with Array.prototype.forEach_.filter
with Array.prototype.filter_.find
with Array.prototype.find_.findIndex
with Array.prototype.findIndex_.indexOf
with Array.prototype.indexOfFixed lintintg issues code indentation according to visual studio code. created two utility functions
Replaced below methods:
_.isObject, _.isString, _.isNumber, _.isBoolean, _.isNull, _.isArray
with custom getType method_.each
with Array.prototype.forEach_.filter
with Array.prototype.filter_.find
with Array.prototype.find_.findIndex
with Array.prototype.findIndex_.indexOf
with Array.prototype.indexOfFixed lintintg issues code indentation according to visual studio code. Added polyfills for Array.prototype.find and Array.prototype.findIndex