rgrove / lazyload

:skull: An ancient tiny JS and CSS loader from the days before everyone had written one. Unmaintained.
MIT License
1.39k stars 288 forks source link

Added es5 'use strict' #24

Closed zafar-saleem closed 10 years ago

zafar-saleem commented 10 years ago

Added EcmaScript 5 'use strict' so that the code runs in strict mode.

zafar-saleem commented 10 years ago

Any reason why 'use strict' shouldn't be used?

rgrove commented 10 years ago
  1. It adds no value in this case. LazyLoad tries to be as small as possible, so every byte counts.
  2. The diff contained 'user strict', not 'use strict'.
zafar-saleem commented 10 years ago
  1. It does add value as all javascript code should run in strict mode so that it prevents certain actions from being taken such as gaining access to the global object. Secondly, it is faster that jshint, eslint and jslint. Few characters do not add tons of bytes anyway. As this library is going to be minified anyway in release applications therefore, it size will be reduced thus will not affect app performance.
  2. Fixed typo.
rgrove commented 10 years ago
  1. That's just, like, your opinion, man.
  2. I appreciate you sharing your opinion with me, but I disagree. Thanks!