JavaScript-Name-Parser icon indicating copy to clipboard operation
JavaScript-Name-Parser copied to clipboard

remove dependency on browser-shims.js

Open pdeva opened this issue 10 years ago • 1 comments

the browser-shims.js file adds functions to some of the core classes of javascript. this make it unaccpetable to use the name parser library in a large project where we dont want a 3rd party lib to modify core behavior in any way.

if you reduce the dependency it will make the library acceptable to use in many, many more scenarios.

pdeva avatar Jul 02 '14 01:07 pdeva

The browser-shims.js file adds functionality that is present in modern versions of Javascript (String#trim:ES5.1, Array#indexOf:ES5.1, Array#filter:ES5.1, Array#map:ES5.1). They are there to provide these modern capabilities to very old browsers (most notably IE <= 8), and their use is common. Because they are standards, other libraries will not conflict with them (except to potentially provide the exact same shims). Where the core behavior already exists, the script does nothing. Removing them as a dependency will only make the code much more complex to achieve the same result, and will be a step backwards in terms of applying modern standards.

cbojar avatar Jul 02 '14 02:07 cbojar