Revision history [back]

click to hide/show revision 1
initial version

answered 2013-04-25 11:02:08 +0800

cvarona gravatar image cvarona

After debugging a little I think it must be a type, for a few lines above the following declarations are to be seen:

var pureFmtStr = efmt.pureFmtStr, ind = efmt.purejdot, fixed = ind >= 0 ? pureFmtStr.length - ind - 1 : 0, valStr = (val + '').replace(/[^e-0123456789.]/g, '').substring(val < 0 ? 1 : 0), ...

in other words,

var nind = (indVal < 0 ? varStr.length : indVal) + shift;

should read

var nind = (indVal < 0 ? valStr.length : indVal) + shift;

After debugging a little I think it must be a type, typo, for a few lines above the following declarations are to be seen:

var pureFmtStr = efmt.pureFmtStr,
    ind = efmt.purejdot,
    fixed = ind >= 0 ? pureFmtStr.length - ind - 1 : 0,
    valStr = (val + '').replace(/[^e-0123456789.]/g, '').replace(/[^e\-0123456789.]/g, '').substring(val < 0 ? 1 : 0), ...

...

in other words,

var nind = (indVal < 0 ? varStr.length : indVal) + shift;

should read

var nind = (indVal < 0 ? valStr.length : indVal) + shift;
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More