use indexof component #5

Merged
merged 2 commits into from Oct 13, 2013

Projects

None yet

3 participants

@juliangruber

for microsoft sucks

@TooTallNate TooTallNate merged commit 415627c into webmodules:master Oct 13, 2013
@klipstein

In which IE does String.prototype.indexOf fail? Just stumpled upon it and wondered why a dependency to the module indexof is necessary.

@klipstein

Can't see where url can be an array and that Array.prototype.indexOf is used. It always is a string (https://github.com/LearnBoost/jsonp/blob/master/index.js#L75) and the changed operation would use String.prototype.indexOf instead, which does not require to be shimmed. I understand that the applied fix works, but it is not nescessary and introduces another dependency and a module is most easily distributable across various environments when it does not have any dependencies.

I'm writing that, because I'm currently trying to use browserify in combination with other js modules and I often find myself dowloading modules and resolving dependencies manually and I also did that for this module. Still waiting for the day where component-modules are available on npm and I can use them directly with browserify without introducing another preprocessor-step or linking directories :)

@juliangruber

yeah you're right, I think I did this while grepping my code base for .indexOf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment