BBC-News/Imager.js — pull request #66 by oncletom (2014-01-23 16:43:33+00:00)
Title: README demo for defining availableWidths as a function does not work

[The readme](https://github.com/BBC-News/Imager.js/blob/5575c4c12ae20a5065ff4aa10af7e981b971b5bf/README.md#availablewidths) suggests that I can pass a function to availableWidths, however the example provided does not appear to work as expected.

[Codepen Demo](http://codepen.io/BPScott/pen/tBxrf)

As an aside:

What is the use-case for defining availableWidths as a function? I know it allows people to customize the function that runs when `replaceImagesBasedOnScreenDimensions` is called, but surely that's core functionality to Imager? Anybody that wants to overwrite it would also have to reimplement `determineAppropriateResolution` themselves otherwise they would end up hammering their image service on every resize. To me this feels like we're giving people the option to reimplement core internals at a too deep level without an obvious reason why they would need to.