Cool, thanks -- pull request sent then :) If this becomes an issue--if there are third party developers relying on the old behaviour of vformat--then we should point them at cordova.utils.format, which does swallow any extra params, but has a slightly different function signature. It's behaviour is not affected by this fix.
Ian On Tue, Apr 2, 2013 at 1:38 PM, Shazron <[email protected]> wrote: > It's not documented AFAIK. Did a grep in cordova-docs, no mention of it in > any version > > > On Tue, Apr 2, 2013 at 8:08 AM, Ian Clelland <[email protected]> > wrote: > > > Working on CB-2825, I've come to the conclusion that > cordova.utils.vformat > > should be working more like the string formatting in console.log(). That > > is, > > > > vformat("abc%sdef", "GHI", "JKL") => "abcGHIdef JKL" > > > > In the JS console, extra arguments remaining after string interpolation > are > > appended to the message before it is output. This is consistent with the > > firebug documentation quoted in the utils.js source, as well as the > Chrome > > developer documentation and Safari behavior. > > > > I have a patch which provides this behaviour on vformat()( > > https://github.com/clelland/cordova-js/tree/CB-2825), but not on > format(), > > since format's behaviour is specified in unit tests. > > > > The question, then, is "Is vformat a documented API which should be > > preserved, because developers rely on it? Or is it primarily an internal > > utility function that can/should be extended in order to fix this issue?" > > > > Ian > > >
