Skip to content

Commit

Permalink
Number: Remove unused code, fix strict mode
Browse files Browse the repository at this point in the history
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 04304b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/number/format-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 04304b2

Please sign in to comment.