JQuery Plugin: Is it appropriate to be able to handle all datatypes coming in or no?
<p>I have a question.</p>

<p>when creating jquery plugins is it appropriate for the plugin to expect a certain data type ie.. hash, array, string etc...  or should the plugin be smart enough to act on it regardless.</p>

<p>My plugin wants to manipulate a URL string... but I can either do it via one url string at a time , or say pass in an array of URLs etc... depending on what the user wants to do...</p>

<p>For instance, lets say the user reads the url from the location, passes it to the plugin, plugin modifies it and then returns it... OR Lets say the user wants to modify all the urls' in a div..so the user passes in that .. ie.. so..</p>

<p>somePlugin(singleURL)
or
somePlugin(jQuery(somediv a).href);</p>

<p>Is convention to take the string or the array or be able to handle both?</p>

<p>Thanks.</p>
