cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Clelland <iclell...@chromium.org>
Subject Is cordova.utils.vformat a documented API?
Date Tue, 02 Apr 2013 15:08:36 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message