Skip to content
Permalink
Browse files

Number: Remove unused code, fix strict mode

Comments from rxaviers:

The variable name `negativeSuffix` was a typo. It should have been 
`negativeProperties`. Although, it also doesn't make sense to set
`negativeProperties` at all. This variable is only used as an auxiliary
variable to get `negativePrefix` and `negativeSuffix`. Therefore, I 
believe that's was mistake when compact support was implemented. That
mistake doesn't cause any bug, because this variable isn't used and it's 
ignored.
  • Loading branch information...
ashubham authored and rxaviers committed Mar 1, 2019
1 parent 8f4f2bf commit 04304b2c44f9c34a0dbeb6a397db5c962437713b
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/number/format-properties.js
@@ -71,11 +71,11 @@ return function( pattern, cldr, options ) {
// the value to be formatted, though we're always using 1 as a simplification, because the
// number won't be zero-padded since we chose the right format based on the scale, i.e.,
// we'd never see something like `003M` anyway.
properties[ 2 ] = negativeSuffix[ 2 ] = 1; // minimumIntegerDigits
properties[ 3 ] = negativeSuffix[ 3 ] = 0; // minimumFractionDigits
properties[ 4 ] = negativeSuffix[ 4 ] = 0; // maximumFractionDigits
properties[ 5 ] = negativeSuffix[ 5 ] = // minimumSignificantDigits &
properties[ 6 ] = negativeSuffix[ 6 ] = undefined ; // maximumSignificantDigits
properties[ 2 ] = 1; // minimumIntegerDigits
properties[ 3 ] = 0; // minimumFractionDigits
properties[ 4 ] = 0; // maximumFractionDigits
properties[ 5 ] = // minimumSignificantDigits &
properties[ 6 ] = undefined ; // maximumSignificantDigits

properties[20] = numberCompact( options.compact, cldr );
}

0 comments on commit 04304b2

Please sign in to comment.
You can’t perform that action at this time.